Swearing is used to signify a number of emotions, (e.g. anger, frustration, joy, surprise). It can be used to achieve a specific reaction from others. It can also be a useful substitute for physical violence.
Swear words can also be used in a more positive manner, in the form of jokes and humor, sex talk, storytelling, self-deprecation or even social commentary.