Someone who suffers, or is even killed, for his or her political or religious beliefs is called a martyr.
Martin Luther King Jr. is often called a martyr in connection with the American civil rights movement. A martyr is also someone who chooses to be put to death rather than renounce his or her religious beliefs, as the story of Saint Stephen tells. In the figurative sense, if you are a martyr to headaches, you suffer from them. Sometimes, martyr is used negatively to refer to someone who chooses to suffer when there is no need to do so.