Definition from Wiktionary, the free dictionary
Etymology 1 
- An expression of one's own physical pain.
- Ouch! You stepped on my toe! That hurt!
- An expression in sympathy at another's pain.
- Ouch! Her sunburn looks awful.
- A reply to an insult (frequently one that is tongue-in-cheek or joking).
- Ouch. How could you say that?
- An expression of disappointment.
- Ouch, I really wanted to do that.
- (slang, Australia, New Zealand, UK) Expressing surprise at the high price of something.
- Ouch, one hundred thousand dollars for a car! I could never afford that!
expression of one's own physical pain
expression in sympathy at another’s pain
reply to an insult
Etymology 2 
ouch (plural ouches)
- Alternative form of ouche.