Primitive cursing was a coercive practice designed to overawe minor spirits.  Oaths at the beginning consisted in pronouncing a curse upon oneself.  The habit of swearing, profanity, represents a prostitution of former ritualistic repetition of holy names.  Peter denied all knowledge of Jesus with much cursing and swearing. 
Modern man no longer attempts openly to coerce the spirits, though he still evinces a disposition to bargain with Deity. And he still swears, knocks on wood, crosses his fingers, and follows expectoration with some trite phrase; once it was a magical formula. 
See also: UB 150:3.12.