The death penalty is a legal punishment where a person is put to death by the state as a consequence for committing certain crimes, known as capital offenses. It is applied in the context of criminal law, distinguishing it from civil law where such extreme measures do not apply.