Treason is the crime of attacking a state authority to which one owes allegiance. This typically includes acts such as participating in a war against one's native country, attempting to overthrow its government, spying on its military, its diplomats, or its secret services for a hostile and foreign power, or attempting to kill its head of state. A person who commits treason is known in law as a traitor.
Historically, in common law countries, treason also covered the murder of specific social superiors, such as the murder of a husband by his wife or that of a master by his servant. Treason (i.e. disloyalty) against one's monarch was known as high treason and treason against a lesser superior was petty treason. As jurisdictions around the world abolished petty treason, "treason" came to refer to what was historically known as high treason.
At times, the term traitor has been used as a political epithet, regardless of any verifiable treasonable action. In a civil war or insurrection, the winners may deem the losers to be traitors. Likewise the term traitor is used in heated political discussion typically as a slur against political dissidents, or against officials in power who are perceived as failing to act in the best interest of their constituents. In certain cases, as with the Dolchstoßlegende (stab-in-the-back myth), the accusation of treason towards a large group of people can be a unifying political message.
In English law, high treason was punishable by being hanged, drawn and quartered (men) or burnt at the stake (women), although beheading could be substituted by royal command (usually for royalty and nobility). Those penalties were abolished in 1814, 1790 and 1973 respectively. The penalty was used by later monarchs against people who could reasonably be called traitors. Many of them would now just be considered dissidents.
Christian theology and political thinking until after the Enlightenment considered treason and blasphemy synonymous, as it challenged both the state and the will of God.