In the Middle Ages, the dybbuk was a spirit of Jewish folklore that could take possession of a person and totally override their personality. It was said that dybbuks were spirits of those who were turned out from Gehenna (more or less the same thing as the Catholic purgatory), presumably because their wrongdoings were so terrible that they could not be tolerated.
A dybbuk will stay with its host until it achieves its purpose or is exorcised. Some people think of dybbuks as 'restless souls' rather than 'evil spirits', and not necessarily a bad thing, but the traditional view was that possession by a dybbuk was a Bad ThingTM.
The word dybbuk comes from the Hebrew verb ledavek, meaning 'to cling to' or 'join with'. It first appeared in the 1700s, although references to this sort of creature are much older. It is pronounced 'dih-buk', and may also be written dybuk.