The Modern Military has the Uniform Code of Military Justice which has something called Article 15.
This Article 15 ( Also called Non-Judicial Punishment) makes the unit commander the judge and jury and is reserved for the day to day type infractions that occur in the military ( breach of regulations, late returning from pass, disorderly conduct, fighting etc)
This is basically where the Soldier will admit he messed up and take his punishment and move on. No trail, lawyesr or etc. Their are some legal proceedings and rights but it is far less complex then a CM. It is also much less punitive. There can be fines extra duty and restriction and loss of some rank, but no discharge or imprisonment.
In the Civil War a Court Martial was the cure all for ALL infractions. This was time consumimg and was much like using an elephant gun to kill a fly. A soldier that was late returning from pass might have to wait for weeks until they could get enough officers together to hol the court and the punishment could be almost nothing. Wheras today it would be settled by his company commander in under a week.