The best way to roast garlic is to wrap it in aluminum foil and bake it between 20 and 60 minutes at 400 degrees. The garlic is roasted and ready to spread after 20 minutes, but waiting longer tends to improve the flavor, adding more caramelization to the taste.
Before putting the garlic in the oven, the first step is to slice off about 1/4 inch from the top to expose the individual garlic cloves to the open air. Peeling the majority of the papery layers off allows the roasting process to access the cloves as well.
The next step is to drizzle a couple teaspoons on top of the garlic cloves that were exposed when the top of the garlic head came off, and then to wait a minute or two to let the oil seep down into the garlic cloves. Then comes wrapping the garlic securely in aluminum foil and placing in the oven.
Sliding a paring knife into a center clove reveals whether the garlic is done; if the texture is soft, the roasting process is complete. Waiting longer allows the garlic to caramelize even more, although 60 minutes is about as long as the garlic roasts without beginning to burn.