A court martial is a trial by military authorities. "Martial" is a word that is often used instead of military.
Martial law is military law. It can mean the law the armed forces are subject to, or to a time of emergency, such as wartime, when the military are give extra powers over civilians.