Perjury is the word used for a person that tells a lie while they are under oath (in a courtroom). Committing perjury is against the law, and can be punished with a jail or prison sentence.
Perjury is a serious crime because it might be used to take away the power of a court, which can lead to punishment for the wrong person. In the United States, perjury is a federal offense, and it can be punished by five years in prison. However, in California, a person who commits perjury can get the death penalty if the perjury led to a wrongful execution.