This year was my first time growing garlic out on my own (my parents have grown garlic for a few years). I learned a lot this year and I can't wait to plant again in the fall!
They stay fresh long enough to last til the next harvest! That's why garlic's always cured after harvest. For storage you want cool, dark, and dry, just like onions and potatoes. The fridge is actually a bit too humid for long term storage, I recommend either in a cellar or in the dryest, coolest part of your pantry.
Fun fact, if you've ever had your garlic sprout on you while storing it in the fridge it's because sub-40°F temps are a core part of the growing process!