I plant garlic and shallots (and sow spinach seeds) in late October, just before our winter cold and snow starts. The following July, when the tips dry out and and the plants lose their shiny green look, it's time to harvest the garlic I'll use throughout the rest of the year.
Garlic needs to cure in order to last in storage. I dig and pull the plants, then lay them out on a table under the shade of the trees for a day or two to dry (if you're in a rainy climate, try to harvest after a couple of dry days, protect the bulbs by spreading them out under cover, like a shed or patio, but don't cover with moisture-trapping plastic). The drying kills the root system at the base of the bulb (rub or cut them off up to ¼" from the bulb), and any dirt can then be rubbed away too. Oldtimers used to braid their garlic - it's both an attractive and effective way to cure and store garlic.
To braid garlic, you'll need to do it soon after harvest while the tops are still flexible, starting with three bulbs and then adding more into the center as there is room (you can braid some string in with the tops for reinforcement, but I don't). Since I use the garlic from the bottom up to keep the braid looking nice as long as possible, and bigger bulbs store better than small ones, I lay out my braiding garlic according to size and start with the smallest, working my way up to the biggest. Once at the top, I continue braiding for a bit, then bind the top with knotted, wrapped, and knotted string (tie it tight - the tops will shrink as they dry) and then make a hanging loop at the back. Hung to cure in my open, airy pantry, I've had top bulbs still good more than a year later.
I planted a couple of different kinds of softneck garlic last fall (hardneck garlic, with one ring of cloves around a stiff stalk, is tasty but doesn't last very well in storage, so I rarely plant it). One variety matured earlier than the rest. On those bulbs, the tops were too dry to braid, so they're stored in the basket below, and will be used first (so I can keep the decorative aspect of the braid as long as possible - I really like the way it looks hanging there). I also kept a couple of nice, big, pretty bulbs in reserve (I have to hide them from Aries, or he'll go after those first if he's doing the cooking) to plant this fall.
So, the basics of curing again: sun-dry for just a short time, then rub off dirt and the wiry, dried roots; separate out any with thick necks or with cloves that have started to separate, and use those first; cure in a warm, well-ventilated, shaded area; when the skins are dry enough to rattle, they're ready to store (in a braid, a basket, a net bag, the leg of a pair of pantyhose - some way so that air can still circulate) in a cool, dark, airy place.