It can express all sorts of emotions, anger, annoyance, betrayal, denial, acceptance, but mostly stupidity.
It is said most often after someone tells a really pointless story and you want to make them feel embarrassed or something.
If someone is threatening you, and you don't want to seem like it bothers you, say O, and then look at your friend right after. You feel cool, but you look like a dumbass
normally said in a very short way, instead of "ohhhh" it's "o"
if you do that one more time, i'll give you detention.