You knew Chewbacca was swearing, right?
Speaking of us as a species, it's safe to say that everybody swears. Every language has taboo words and every culture employs certain words to insult, abuse, curse, or simply to express strong emotion.
Perhaps it's called "salty language" because of sailors reputations for swearing. To me it suggests seasoning. Swearing seasons our language. There is even some evidence that swearing temporarily relieves pain, and I --and my stubbed toes and veggie chopped fingers-- totally believe that!
So swearing provides an outlet for emotion, and an insight into a person's mood, class, and culture including what that culture holds sacred or most intimate. For this reason writers have always employed swearing from the greats like James Joyce and J.D. Salinger to -- well, I'm sure you won't have to think very hard to come up with your own dirty dozen.
In 1939, Gone With the Wind used the first swear word in modern American film, kicking off a weedy growth of rough language in movies that has plateaued with the likes of Quentin Tarantino (who works in swears like a painter does in oils). Unfortunately the great ones always spawn a flood of mediocre imitators. A little goes a long way. Apart from Tarantino (or, say, South Park for TV), I am not alone in feeling that many movies, shows and books are ruined by too much foul language.
The broader censorship of network television forces writers to be creative, which often leads to worthy innovations, especially in science fiction and fantasy. From Mork's "Shazbot!" to BSG's "Frak," these shows have a long tradition of employing nonce words, in place of words that would never make it past the censors. Television, and specifically science fiction TV, has inspired some of the most creative uses of invented language. It can be an education for any fiction writer in any medium.
My favorite example is the Firefly series. There are nonce words like "gorram" for "goddamn," but also the use of long strings of Mandarin and Cantonese Chinese phrases, which are not only fun to listen to, but illustrate the melting pot culture of the human diaspora across multiple terraformed worlds. Because, of the show's Western influences it also comments on the fact that the American Western Expansion was considerably more multicultural than is generally remembered (I do like a little past with my far future). There are many sites where you can learn Firefly swears and even an iPod app.
Next would have to be Battlestar Galactica, who even in the 1978 series employed "frack" and "felgercarb." The reboot changed the spelling to "frak," so that it would literally be a four-letter world. They also added the racial epithet "toaster" for Cylons. Recently, "frak" has been enhanced by its connotation with the term fracturing, as in hydraulic fracturing. The environmentally destructive, and controversial method of blasting oil out of shale.
It's pure joy watching the actors (and yes the puppets) on Farscape give life to swears they utter. "Frell" is by far the most common, there are quite a few others, listed here.
The dialogue in Babylon 5 is liberally peppered with the words like "frag" and the Narn word "shrock."
Red Dwarf replaces most of its characters' profanities with insulting terms, mainly "smeg," leading to the term "smeg-head." Other common insults include "goit" and "gimboid".
TO NONCE OR NOT TO NONCE
Orson Scott Card observes that human profanity encompasses words dealing with sexual intercourse and waste excretion, and states that that tells one something about human beings. He suggests that what aliens might find to be profane can be a useful tool for suggesting the alienness of a culture. When creating swears for your characters think about what our culture considers transgressive then think about how you could change it up to illustrate the differences in the alien culture you're building.
It may also help to consider all the different ways that we swear. Here's a brief refresher.
TAXONOMY OF SWEARS(I drew much of this from Expletive Deleted: A Good Look at Bad Language by Ruth Wajnryb)
ABUSE - Aggressive language, name calling, and derogatory metaphoric curses. Monty Python's The Argument Clinic illustrates this at around 0:41 (come for the abuse, stay for the tutorial on arguments)
BLASPHEMY - A form of swearing that deliberately vilifies religion. What's important here is the swearer's intention. E.g., in the strictest cases a word like "Jeez," standing in for Jesus can be taboo.
CURSE - Often used for more general terms like swearing or cussing. To curse means to invoke a higher being for the purpose of calling down some evil on the cursee. It is more ritualistic and deliberately articulated and may not involve the use of foul language. In more religious times, curses were serious and intended literally, now days curses are more spontaneous and metaphoric e.g. Rot in Hell!
EUPHEMISTIC SWEARING - "Sugar!" Substituting an inoffensive term for one that is considered taboo. (My high school track coach did this all the time.)
INSULT - An abusive term meant literally: "you, ugly, fat, pimply, idiot," rather than the metaphoric sense of most swear words "you're screwed."
INVECTIVE - Insult's fancy cousin, more refined and often used in more formal contexts employing irony, wit, puns, and wordplay. It often does not involve profane or obscene language.
SNARK The sarcastic often malicious speech especially found on the Internet (no relation to the fictional creature Lewis Carroll's The Hunting of the Snark).
SWEAR - In this context, the general term for using profane or obscene language. In it's verb form it is the act of taking an oath as in "to tell the truth, the whole truth, and nothing but the truth."
OATH - A formal promise, swearing by the bible, by Jove, or by whatever flips your switch, including yourself: "cross my heart and hope to die."
OBSCENITY - Explicit use of indecent or taboo worlds to refer to intimate parts of the body and the body's functions and products.
PROFANITY - Words that abuse anything sacred, it's a wider term than BLASPHEMY and often has no intention to vilify, instead uses religious terminology in a secular and indifferent manner.
TABOO WORDS - Words that have been proscribed by a particular culture as being off-limits. It encompasses all of the above plus stigmatized topics such as mental illness and birth defects.
VULGARITY - Broader than obscenity, it makes use of foul language by breaking taboos related to intimate language often substituting words that are DYSPHEMISTC (the opposite of EUPHEMISTIC). E.g., "Wow, look at her ass!"
Whether you use nonce words or real swears, done well swearing can enhance your writing and your worldbuilding by illustrating culture, personality, and emotion.
Just remember too much seasoning ruins the dish!