Exploring Sadomasochism

Rihanna sang a song about S&M, but what is the origin of sadomasochism? It may look like a foreign concept but it is slowly creeping into society especially in some classes of people. What is the fascination with sadomasochism? Is it safe and more importantly, what are the health risks involved?