The Monitor came into being as a scientist of some sort. He was extremely advanced even for his high-tech civilization.
I can't remember how it happens but something he does screws up the cosmic checks and balance system so in order to even out the equation the Anti-Monitor is created.
Anti-Monitor continuously gained power by consuming the different universes in the multiverse using white anti-matter which pretty much destroyed everything on contact.
As AM's powers grew, the Monitors powers weakened...until he died.
The Spectre was powerless against Anti-Monitor