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.
What I've done many times is when I harvest, most of the bud is bag dried (which generally takes 6--8 days) but I leave a weeks worth out to dry on a tabletop in less than 1 day and smoke that while I'm waiting for the slow dry to finish. Then I jar up all except a few days worth and then remove a bud here and there as needed during the cure.
Curing is ideal for the home grower. Our harvests usually come in "clumps"--a lot all at once and then none for months. If you plan it so you have enough to last you til next harvest, this is the perfect time for a months-long cure.
I usually wind up giving mine a regular dry since it all goes away and I don't have time to cure it first but what I keep stays in a big jar with the swing-top latch and rubber seal on it, after about a month there is a definite difference.