A sadist is one who enjoys the inflicting of pain; this state is known as sadism. The term is usually used in a sexual context. It comes from the name of Donatien Alphonse Francois, the Marquis de Sade, who famously combined the inflicting of pain with sex both in fact and in his significantly voluminous fiction.
The complement to the sadist is the masochist, they who enjoy receiving pain. Masochism is named after Leopold von Sacher-Masoch who, reportedly as an experiment in thought, sought to become sexually excited by pain, and who also is a noted author on the subject of pain and sex.
Sadist is also used as an epithet against those who appear to enjoy any suffering, whether they have caused it or not (but especially when it is caused by the individual in question.)