Generally the best time of year to plant garlic is in fall (late September to mid October) because the plants need a natural dormant period that includes exposure to cold temperatures (a process called vernalization).
Garlic likes full sun and rich, well-draining soil (though it can tolerate many soil types). If yours is on the clayey side, add 2 to 3 inches of aged compost on top of the soil to help loosen it and improve soil structure.
Break your bulbs apart and pick out all the cloves that are firm and plump, leaving the papery wrapping on each clove as intact as possible.
Dig a trench about 2 to 4 inches deep. (Warm climates can go as shallow as 2 inches, and cold climates should go up to 4 inches deep the farther north you are.) Plant each clove, root end down (and pointy end up), 4 to 6 inches apart with 6 to 9 inches between rows.
Water your newly planted garlic bed to settle the soil, then cover with 3 to 6 inches of organic mulch (like straw, pine needles, wood chips, grass clippings, or shredded leaves).