Sadomasochism is receiving pleasure (in the case of the stories I write and this blog, sexual pleasure) from giving or receiving pain and/or humiliation.
Often people who are into sadomasochism (or SM, s/m or S & M) are, to varying degrees, a switch (meaning exactly like it sounds) but sometimes a person will be into only one side of the SM coin — giving or receiving.
If you are into inflicting pain and humiliation you’re called a sadist and if you like receiving it, you’re a masochist.
Obviously consent is a huge issue when you’re dealing with S & M and partners will usually work out limits, safe words and the like ahead of time. It’s better to be safe than sorry.