People are typically confused about the exact meanings of "swearing", "cursing", "vulgarity", "sacrilege", and the like, and consequently refer to them interchangeably with the words "swearing" and "cursing".
"Swearing" is calling upon the deity (or some substitute) to witness the truth of what one says or promises. Thus, "So help me, God, it's true!" The Bible doesn't prohibit swearing; it's "false swearing" that's wrong--in other words, perjury, calling on God to verify what one knows is a lie.
"Cursing" is in effect placing a sentence of some bad future on someone or something: "Go to Hell!", or "May all your children have big noses!", or that wonderful (supposed) Chinese curse, "May you live in interesting times!"
"Sacrilege" (not 'sacrelige', or 'sacreligious'; see below) means in effect stealing sacred objects, at root, and by extension, in some way using what is sacred for a base or irreligious purpose. The etymology here is "sacri", meaning sacred, and "lego", to take--to steal sacred objects. The word "sacrilege", in other words, is not based on "religion" or "religious", as some confused spellers seem to think.
The F-word, discussed above, is none of these, but is a vulgarity, as are shit, crap, and so forth. They are merely disapproved of because in our culture "refined" or educated people don't throw them around, and their use marks one as a member of "the great unwashed", so to speak.
Always glad to clear up some concepts.
Yours truly, the wandering pedant, Dave Oesterreich