We just got back from our beach vacation yesterday and one head of garlic plus a clove are sprouting, so I'm going to plant them in the garden. Here in Zone 7, we can plant garlic and onions any time the ground can be worked and they will be ready about eight months later; you can tell when they're ready when the leaves wilt and turn brown - see photo 2 below. Plant them about four inches deep with the sprout facing up, about eight inches apart.
If you live further north in a cooler climate, check with your local extension office to find out when is the best time to plant them outside. If they sprout during the winter, I see no reason why you couldn't put them in a pot and then plant them outside in the spring.
I use garlic from the grocery store that has sprouted in the kitchen. I've heard that garlic and other root veggies are treated with something to prevent sprouting, but my experience is that grocery-store garlic does sprout, so into the garden they go!
To harvest, just pull them out of the ground. Brush off the dirt, but do not clean with water or cut off the leaves. After harvesting, put them in a box or other dry location (I put them on wire racks in the sunroom) to cure for two weeks. Then, you can braid the leaves together and hang the bunch in the kitchen, pantry, or other place you have for storing onions and potatoes - but not in the fridge!
1) Sprouting garlic.
2) Garlic in the ground, ready to be harvested.
3) Freshly harvested garlic.