What happens is a complex chemical process.
Basicallly what happens is decomposition. I can't give you the exact nuts and bolts but sugars get converted, chlorphyll degrades, non-pyschoactive compounds convert onto pyschoactive ones.
A gas builds up in the sealed containers as a result and the container is unsealed daily for a few minutes to let the gas escape, then resealed and the process continues.
Then end result is pot that smells better, tastes better, burns better, and is up to 1/3 more potent than the same bud uncured.
A minimum cure takes 2 weeks, but the longer you cure the smoother the pot will be. Once the pot reaches perfect moisture level (like a humidor cigar) you only have to take the top off once every week or 2.
Right now I'm smoking bud that has been curing since Nov., and I've smoked bud aged as long as 2.5 years.
Once you smoke slow-dried cured weed you'll never go back to flash dried, uncured, harsh, hay-tasting weed.