The U.S. Army Trial Defense Service (USATDS) is set up to provide free legal advice to soldiers facing court-martial, nonjudicial punishment (aka Article 15), administrative separation, and other adverse action. The USATDS was removed from the Staff Judge Advocate (SJA) office in 1980 to ensure confidence in soldiers that their attorney had their best interest in mind and not those of the other prosecuting attorneys in the SJA office.
An Article 15 is an option that commanders have to deal with minor misconduct without resorting to a court-martial. Soldiers can accept an Article 15 or demand a trial by court-martial. With an Article 15, the commander holds a private or public hearing. Both sides present their sides to the commander. You can present your own case with witnesses and written evidence. After hearing from both sides, the commander determines guilt and what punishment (if any).
If the defendant doesn't like the judgement, it can be appealed to the next commander up the chain of command (typically from the company commander to the battalion commander). The soldier has five days to file an appeal based on one or more of three grounds: (1) there was not enough evidence to find you guilty, (2) the punishment imposed was too severe, or (3) the commander did not follow proper procedures. The commander hearing your appeal can agree with the original judgement, reverse the judgement, or lessen the punishment. The punishment can not be increased when appealed. Whatever decision is made at the appeal is final.
The possible maximum punishments under Article 15 are much less severe than what a defendant might face in a court-martial. A guilty finding in an Article 15 isn't considered a federal conviction, the same isn't true if found guilty in a court-martial. A guilty finding with an Article 15 will be filed in your military records, but varies depending on your rank. If you are an E-4 or lower, the Article 15 will be filed locally in the non-judicial punishment files. It will then be destroyed either two years from the date of imposition or upon changing duty station or exiting the service. For those that are E-5 or higher, the imposing commander has discretion to either file it in the restricted or performance fiche of your Official Military Personnel File (OMPF). Your future military career will likely be negatively affected by an Article 15 filed in your OMPF.