|Freshly potted rosemary, NOT garlic. But it goes well in dishes with garlic.|
Different types and varieties have different shelf lives, but all should be kept in a cool, dark place to prevent shriveling and sprouting, as well as being cured properly.
Dig your garlic when all but the top 5 or 6 leaves have died. Don't dig immediately after rain or when the soil is really wet, unless you have no choice. Garlic dug from dryish soil will store longer. Use a garden fork to loosen the soil around the garlic and then pull it free.
Cure garlic in a shady, open place for about three weeks. I cure mine on a wire shelf rack in the garage. Then cut the stem about an inch from the top of the bulb and place in net bags. Keep in a cool, dark place, but not in the refrigerator. If you want to braid your garlic, soft neck varieties work best. But keep the braids in your cool, dark storage, bringing out one at a time to "decorate" the kitchen, as long as you will use it all in a few weeks.
My neighbor told me he keeps his garlic on an enclosed porch where it doesn't freeze but stays pretty cool. A temperature no higher than 60 degrees gives better storage, but the cooler the better. But not in the refrigerator. (Did I say that already?) I plan to put mine in a cabinet in our attached, but unheated garage.
None of the garlics I've planted ever stored through the winter. They shriveled and/or turned brown by the end of December. I suspect that my storage area was too warm. The pantry where I kept the garlic is open to the kitchen and so stays as warm as the rest of the house. An unused room that you don't heat much could be a good choice.
I hate harvesting lots of lovely garlic bulbs and having to throw out a bunch of them in the middle of winter. You can prepare your garlic for long-term storage if you don't have the best of storage places or otherwise feel you can't use it all before its expiration date. Or if in mid-December you notice the cloves start to shrivel a little.
Chop garlic finely and dehydrate (start dryer at 140 degrees for 2 hours then turn down to 130 and dry until crispy). Store in air tight jars. You can grind it into powder when needed, if that's easier for you to use. Mix it with salt for garlic salt to put on popcorn.
The freezer can be your friend here, too. Blend garlic with olive oil and pack into small jars to freeze. It will stay soft enough to scrape out whatever amount you wish. Never store garlic, raw or cooked, in oil at room temperature as it may grow botulism bacteria and turn deadly. Always freeze it. Commercially canned garlic in oil is prepared under specific conditions and acidified, a process that cannot be repeated properly at home.
Alternately, garlic can be simply chopped and frozen, or frozen as whole, unpeeled cloves. Raw, peeled cloves can be submerged in wine (preferably a dry one, white or red) or vinegar and stored in the refrigerator for up to four months. The flavor permeates the liquid, which can be used as a seasoning.
Are you tired of reading about garlic yet? I think I've said all I want to say, although garlic has such a long history of cultivation and use that much more can be said. Look it up yourself, is what I say.
And notice, I didn't hardly mention vampires at all.