This is my second year growing garlic. Last year I planted them in one long row, this year I did a small block of 32 bulbs - 4 rows of 8. So far, I think I like the block idea better, but I can't really say why.
Garlic is easy to grow, in general. Get a bulb from a farmer's market or buy organic from a grocery store, divide the bulb into cloves, and plant them, pointy side up, about 4-6 inches deep. (Don't buy conventional garlic - it may be treated with chemicals that prevent it from sprouting.) Last year I spaced the cloves about 8 inches apart, this year more like 6, and next year I might even drop it to 4. I can't imagine a bulb being much bigger than 4 inches, but I don't know. The larger the clove, the bigger the bulb you get next year. Think about that when you plant - plant the larger cloves and use the smaller ones for cooking to ensure you get nice big bulbs next year.
This year, I apparently accidentally planted a bunch of cloves that were in the process of splitting, so they put up two sets of leaves. I'm not sure what will happen when I pull them up, but I'll write about it.
Plant them right around Thanksgiving, at least if you live in a climate similar to mine in the Sacramento valley. Water them until spring, when the leaves start to turn brown. Stop watering them at that point, and let them dry and fall over. Then you can dig them up, very carefully so you don't damage them, and cure them for storage. To cure them, hang them or store them in a dark, cool, ventilated place for several weeks (see these sites for more info) before storing them. You can start eating them at any time, though.
If you like, you can try to braid them - I might give it a shot this year.
Shallots are grown in the same way - I planted them in the fall for the first time, and I'm excited to see what happens when they are ready this year!