(Def. 1): A popular method of intimidation in ancient history; where the winning army cuts off the heads of defeated soldiers, impaling them on a pike or stick to demoralize and frighten the conquered people. It was also used after an execution to make a public example of the consequences of breaking the law.
(Def. 2): A metaphor describing retaliation or punishment for another's wrongdoing, or public outrage against an individual or group for the same reason.