Whoo-hooo digging out my old lecture notes for SM101.......
and seriously editing them to stay within JF bounds.
Mashochism is the brain revising its response to pain so that it is a pleasurable sensation. Usually the response is very specific to the sensation. One who enjoys pain stimulous #1 will not necessarily have a pleasurable response to stimulous #2 or #3 (the except being those commonly referred to a "pain pigs")
Sadism is the brain responding to the infliction (sometimes simple observation) of pain upon another person. Essentially (thought technically not quite) the opposite of Masochism.
Switch - one who experiences both with nearly the same level of enjoyment. (rare!) Usually someone who functions in this dynamic has clear preferences but has set the aside for expediency (ie. available experiential factors).
Sado-masochism is the interplay of these two dynamics.
As for the sexual aspect, it is not required by definition and can be totally absent from the dynamic. However, because of some biophysics and cultural influences sexuality is often a significant factor.
Shibari or Kinbaku is a well known Japanese art of this type.
Any more questions?
Madame