Final answer:
A court consisting of military or naval personnel appointed by a commander to try offenses against military law is known as a military court-martial. It operates under the UCMJ and varies from summary to general courts-martial based on the offense's severity.
Step-by-step explanation:
The court referred to in the question, consisting of military or naval personnel appointed by a commander to try charges of offenses by soldiers or sailors against military or naval law, is known as a military court-martial. A court-martial is a judicial process that mirrors civilian courts, but it is the military's tribunal specifically for enforcing military law. It operates under the Uniform Code of Military Justice (UCMJ) and is reserved for prosecuting members of the military for offenses that are outlined in the UCMJ. Court-martial hearings can vary in severity, ranging from summary courts-martial for minor offenses to general courts-martial for more serious charges, which can include the death penalty.