Swear is one of those words that comes to us alllll the way from Old English. In its original (and still a surviving) meaning, it’s simply “to take an oath.” You may wonder, then, why it’s sometimes associated with “use bad language”? I know I have! That meaning is pretty ancient too, dating to the early 1400s. It’s thought to have developed because of the “invoking of sacred names” that comes with taking an oath.
There’s a pretty funny diatribe on the difference between swear and curse by an etymologist, which I shall here quote just for the fun of it:
[Swearing and cursing] are entirely different things : the first is invoking the witness of a Spirit to an assertion you wish to make ; the second is invoking the assistance of a Spirit, in a mischief you wish to inflict. When ill-educated and ill-tempered people clamorously confuse the two invocations, they are not, in reality, either cursing or swearing ; but merely vomiting empty words indecently. True swearing and cursing must always be distinct and solemn …. [Ruskin, “Fors Clavigera”]
So then. Swearing, by his definition, is an oath witnessed by God; whereas cursing is calling down ill on someone by the power of God or a less-holy entity.