The word profanity is often used to denote vulgar or salacious words or phrases. Most people who care about precise usage, however, consider this to be incorrect. The words obscenity, profanity and vulgarity are frequently used as synonyms. While they are very similar in meanings, they are not identical.
The word profane is derived from the Latin profanus which means ‘outside the temple,’ which is to say, unholy. Used as a verb, to profane is to take something holy and to debase it. The word profanity thus denotes something which is blasphemous or a sacrilege.
Obcenity refers to words or actions which are offensive to ideas of decency or modesty. Vulgarity, from the Latin word vulgis, meaning 'common,' implies courseness or crudeness. An oath (or swear), such as "God damn it!" would be profane, whereas a scatological or sexual crudeness would be vulgar and/or obscene. For example, "crap" is vulgar but mild enough that most people would not consider it obscene, whereas "shit" is likely closer to being an obscenity.
It is (potentially) interesting to note that it is also possible for something to be profane without being obscene or vulgar. Even mild oaths are considered to be sacrileges by certain religious groups (Orthodox Jews and Mormons can be exceptionally strict on these points), so, while even the most prudish persons would not likely consider "gosh darn it," "good heavens" or mentioning the word "God" in a conversation to be vulgar, it is profane in some circles.
Some Southern Baptists (and probably members of other Christian groups as well) consider informal references to the deity (like "The Big Guy" or "The Man Upstairs") to be profane. Usually, profanity refers to words or actions of a nature which is specifically offensive to members of a religious group. The term blasphemy refers to a specific attack against a religious belief or group. That which is profane varies depending on the religion of the person in question.
The Los Angeles Times Stylebook
Thompson, Glenda, "Hell’s Language: An Historical, Social, and Linguistical Look at Cussing" - http://www.unm.edu/~abqteach/linguistics/02-08-10.htm
...and a shout out to Webster 1913 for nifty etymological info.