The idea that a higher power such as fate, destiny, or a god controls and toys with our lives; It is 'cosmic' because of the universal, all-pervading influence of the higher power, and it is 'irony' for the perceived control of one's own life when in fact no free will exists.
Joe couldn't believe the cosmicirony that all his girlfriends left him for another woman.
Most commonly used in the same context as "oh, damn". Used to express frustration, anxiety, depression, etc. Ocasionally the second syllable is prolonged to demonstrate any emotion in an extreme fashion.
As an exclamation on it's own: Instead of "I can't believe I'm so stupid!", justuse "Blerg!"