Using a serrated knife, slice off the tops of the garlic heads. You do not want to cut off too much, but you want to expose part of the cloves. Depending on the shape of your garlic, this is approximately 1/2 inch.
Place the garlic heads on a piece of tin foil. Drizzle the cut side of the garlic with olive oil. Sprinkle each garlic head with the salt and black pepper.
Wrap up the cloves in the foil to create a pouch. You want the garlic completely enclosed without any venting.
Place the garlic pouch in the oven and cook for approximately one hour. The garlic is done when it starts to turn brown and softens.
Remove the garlic from the oven and let cool. Squeeze each garlic head from the root base to remove all of the garlic from the skin.