Well S is for Sadist ( they enjoy watching others suffer), and M is for Masochist (they enjoy suffering). When these words are used in the phrase "S and M" it's usually for sex. But in the series it's not meant in an inappropriate way, just for saying that one person of the couple is a sadist and the other is a masochist.