Habeas corpus is a fundamental legal instrument safeguarding individual freedom against arbitrary state action. It serves as an important check on the power of the government, requiring law enforcement to show a court that a person's imprisonment or detention is lawful.