Self-mortification is when a person punishes himself, often physically. Most self-mortification is practiced by deeply religious people.
In Christianity, self-mortification is called "mortification of the flesh," and it ranges from self-denial — like not drinking alcohol or fasting — to hitting one's own shoulders and back with a whip or strap. Self-mortification isn't practiced by all Christians, and it is a part of other religions as well, especially for very strict followers. The root word is mortificationem, "a killing, or a putting to death" in Latin — in other words, the killing of a person's desires through self-discipline.