Preheat the oven to 375°F (190°C). Begin with whole garlic bulbs—one or several, depending on how much roasted garlic you want. Slice the top off each bulb to expose the individual cloves, but leave the bulb intact so the cloves stay together while cooking. Place the prepared bulbs cut side up on a sheet of aluminum foil.
Drizzle each exposed bulb with a little olive oil and season lightly with salt and pepper. Fold the foil around the bulbs to form a sealed packet, positioning the seam on top so the oil stays inside. Set the foil packet on an ovenproof tray or dish to catch any occasional drips, then bake for 30–45 minutes.
The garlic is done when the exposed cloves turn a light golden brown and feel soft and creamy when pierced with a knife. The long, low heat caramelizes the natural sugars in the garlic, giving it a sweet, mellow flavor. Allow the bulbs to cool until they are safe to handle.
If you roast several bulbs at once, consider wrapping each bulb individually so each packet contains its own oil and seasonings. For more even roasting, place the individual packets in the cups of a muffin tin or cupcake pan—each bulb will sit in its own pocket and cook uniformly.
To use the roasted garlic, squeeze the softened cloves from their papery skins. Roasted garlic is versatile: mash it into butter, mix it into sauces, spread it on bread, or whisk it into dressings for a rich, mellow garlic flavor.
For storage, roasted garlic freezes well. Squeeze the cloves out of their skins and portion them into small servings or a larger freezer bag. Label and freeze; frozen roasted garlic will keep its flavor and can be added directly to recipes as needed.