Most federal cases end in a guilty plea, usually under a written plea agreement, while others are resolved by trial or by dismissal. How a case is resolved determines the charge of conviction, any mandatory minimum, and much of the sentencing calculation.
Start here: