One way to roast garlic cloves is to place individual unpeeled cloves in a baking dish, tossed with olive oil. Cover the dish with foil and bake the garlic for 45 minutes at 350 F. Once roasted, pinch one end of each clove to release them from their skins.
To roast garlic that is already peeled, place a handful of cloves onto a baking sheet lined with foil. Drizzle olive oil over the cloves, as season to taste with salt and pepper. Gather the ends of the foil up over cloves to form a packet and seal tightly. Bake the packet of cloves for about 45 to 60 minutes at 375 degrees Fahrenheit, until the cloves are soft.
To roast whole heads of garlic, cut off the top of each head so that all of the cloves inside are exposed. Coat a pie pan or small baking dish with olive oil. Add the garlic heads in a single layer, with the cut sides up. Drizzle more olive oil over the garlic heads, along with salt and pepper, then cover the pan tightly with foil. Place the pan in the oven set to 375 F, and bake the garlic for 40 to 45 minutes. When they're done, allow the garlic heads to cool to the touch, and then grab the bottom of each and squeeze gently to push out the soft roasted cloves.