Apostasy is a term used in a religious context, for leaving one's religion. Usually it means moving to another religion. Someone who does this is called an apostate. Apostasy is different from heresy: A heretic only questions one (or more) of the traditions and beliefs of their religion. An apostate questions all of them.
The word was first used in Christianity: In the Roman Catholic Church the punishment for apostasy is excommunication. Today, the word is used mostly in the context of apostasy in Islam.
Sometimes the term is used as a metaphor to refer to changing a non-religious belief or cause, such as a political party or a sports team.
A person who rejects, underestimates, mocks or disrespects religious orders defined as fard or sunnah in fiqh or speaks words called "alfaz-i kufr" is called apostate. According to the Sharia law, the penalty is death.