In real life (that is, when I'm not toning things down when writing articles such as this), I am occasionally given to bursts of "sailor-speak." That is, I from time to time pepper my language with the occasional expletive of the four-letter (or longer) variety. I am not apologetic about this, given the neighborhoods I grew up in, but a lot of people are. Many people feel that there is something inherently WRONG with swearing, and they tend to look down on people who do it.
So just on the off chance that there are one or two of those individuals in the reading audience, what do you say when you are working around the house, miss the nail you were aiming at, and accidentally bash your thumb with a hammer? Do you say "Oh fudge" or "Oh snit," or do you find yourself instinctively reaching for the more colorful, similar sounding versions of those epithets? Be honest now.
OK, that taken care of, would you be surprised to learn that using the more colorful words has been shown by neuroscientists to actually reduce the level of pain you feel after whacking your thumb? While the less colorful euphemisms have no effect on it whatsoever?
The brain treats swear words differently than other words
Your brain has both motor and premotor areas, both of which have some control over speech and writing. A part of the brain called Wernicke's area handles the recognition of and processing of spoken words. The prefrontal cortex handles things like personality and determining what is appropriate social behavior. In most people, the left hemisphere of their brains is in charge of language, while the right hemisphere is in charge of the emotional content of language. Processing language is known as one of the "higher" brain functions, while processing emotion is considered one of the "lower" or more primal and instinctual brain functions.
Functional magnetic resonance imaging (fMRI) scans of the brain have revealed that swearing tends to affect the "lower" regions. Strong language gets "tagged" emotionally as we grow up, because our parents or teachers or peers react more strongly to certain words than others. If they react negatively to these words, that emotion gets stored in our brains along with any meanings of the words. So instead of processing "swear words" as a series of sounds or phonemes (as we do other words), the brain stores these "emotionally charged" words as whole units. As a result, the brain does not need the left hemisphere's help when processing them. Instead it relies on the limbic system (which controls memory, emotion, and behavior), and the basal ganglia (which controls motor functions and impulse control) to process the "swear words."
In a very real sense, therefore, swearing is a motor activity with a strong emotional content. This is one reason that most people remember swear words four times better than they do other words. fMRI studies have shown that the brain tends to "struggle" with itself when a person swears, these two areas competing for which will "win" in the moment.
Swearing is also affected by some disorders
One condition known as aphasia causes people to lose the ability to speak or pronounce words, as a result of disease or damage in the parts of the brain that control language. But even when aphasics have lost the ability to speak other words, they remember how to swear, and have no trouble remembering the more colorful words in their former vocabulary. Similarly, people who have undergone an accident or procedure that severs the connection with the left hemisphere of their brains tend to display a dramatic drop in their language abilities, but they still remember how to swear. There are other conditions such as Tourette's Syndrome that lead to coprolalia, an uncontrollable urge to swear. Studies of individuals afflicted with this condition have shown a strong link with the basal ganglia, and thus the more emotional components of language.
As for how swearing can actually affect our perceptions of pain, one can only theorize, but there is ample scientific evidence that it happens. For example, Keele University psychologist Dr. Richard Stevens' research on the link between swearing and pain was inspired while sitting with his wife as she was giving birth to their children. When the contractions were at their worst and most painful, she often felt the need to swear, but as the contractions eased, so did the swearing. Curious, he began a series of experiments in which subjects were asked to experience mild levels of pain (holding their hands in a tub of freezing water) while repeating either neutral words, or swear words. The subjects were able to tolerate the pain significantly longer when repeating the swear words than the neutral words. His theory is that the association of emotion with these words triggers the "fight or flight" response in humans, stimulates the flow of adrenalin and endorphins, and thus can actually relieve pain.
Warning: Although this form of pain relief has been shown to be scientifically effective, if you are sitting in church and develop a blinding headache, we do not recommend its use there. While it may, in fact, work to relieve your headache, the "side effects" of this particular treatment methodology may not be all that you desired.