Habeas corpus is a writ (court order) that requires a person under arrest to be brought before a judge or into court. It's a legal instrument to protect individual freedom against arbitrary detention by the state. It's specifically classified as a 'writ' in legal terminology, not merely an order, law, or rule.