The UCMJ has a provision to allow for punishment for misconduct through certain judicial proceedings, such as a court martial. There is also the ability to impose a nonjudicial punishment, which is under Article 15 of the Code. The purpose is maintaining discipline within the ranks. Penalties can be imposed for minor offenses. Your commander is given authority under this Code to administer these punishments. The offenses covered under Article 15 include offenses against property (such as theft, trespassing, check fraud, larceny, etc.), and offenses against public peace (such as assault, providing alcohol to a minor, harassment, disorderly conduct, acts of violence, littering, and minor drug offenses etc.) and offenses against public safety (such as disturbing the peace, careless operation of a vehicle, discharging weapons, etc.).
Nonjudicial punishments (NJP) are the punishments allowed to be imposed for a range of minor offenses. The commander (if you are a member of the Army or Air Force) or the “officer in Charge (the officer who has court martial authority) has the right to make an inquiry into what occurred, and have a hearing on the offense. This individual in authority can dismiss the charges, or to impose punishments as laid out in the act, and refer the case for a court martial. The nature of the offense and whether it is considered minor is decided by that individual officer.