Definition from Wiktionary, the free dictionary
Initialism of "oh my God".
Alternative forms 
- (chiefly Internet, slang) An exclamation of excitement, surprise, amazement, or shock. (Oh, my God!)
- "OMG, I just won tickets to a concert! Today is the best day ever!"
- "...and then he said I was ugly, so I punched him in the face." — "OMG, really?"
- "...and then I found out my fish died." "OMG, I'm so sorry to hear that."
- (computing) Initialism of Object Management Group.
Usage notes 
- Variants include OMFG (for oh my fucking god), zOMG and ZOMG (emphatic, result of many users accidentally pressing the Z key while attempting to press the Shift key before typing "OMG"), and OMGZ (emphatic, in the same sense of LOLZ). In different contexts the offensiveness of these phrase variations can vary from blasphemous to mild, due to its invocation of deity.
- See also Wikisaurus:wow.