The backbone of the military legal system is the Uniform Code of Military Justice (UCMJ), which applies to all branches. While the UCMJ is similar to civilian law, it is also more strict in several areas. The UCMJ contains everything from a list of crimes and offenses to rules for trials and sentencing. All active duty personnel, activated reservists & Guard members as well as retirees are subject to the UCMJ at all times. If a military member commits a crime while off-duty that does not involve the military they can still be subject to the UCMJ as well as civilian penalties.
To learn more about this subject, continue to their website using the Website Address noted above.