Used to express repugnance, disgust, or annoyance.
Ugh! The bread in the pantry has gone moldy.
Used to express inarticulate vocalisations, such as used by a caveman.