It is a prohibition of blasphemy, specifically, the misuse or "taking in vain" of the name of the God of Israel, or using His name to commit evil, or to pretend to serve in His name while failing to do so. Speak casually or idly of someone, as in There he goes, taking my name in vain again. This idiom originated as a translation from the Latin of the Vulgate Bible (Exodus 20:7), “to take God's name in vain,” and for a time was used only to denote blasphemy and profanity. the commandment “You shall not steal” as an expression of the commandment to love your neighbor as yourself. ... The seventh commandment forbids unjustly taking or keeping the goods of one's neighbor and wronging him in any way with respect to his goods. Exodus 20:7 says: “Thou shalt not take the name of the LORD thy God in vain; for the LORD will not hold him guiltless that taketh his name in vain.” ... The simplest meaning of this name for God refers to His self-existence or His eternality (God has always existed).
Originally Answered: Is saying “oh my god” really using God's name in vain? Yes, it is. Any time you take the name of Deity and remove it from its sacred context, you are using God's name in vain. To use His name in vain means to use it in an empty or superfluous way.