Place the oil and the garlic in a small saucepan. Cook over low heat until the garlic is soft and lightly browned, approximately 50-60 minutes. (see Note #1)
Allow to cool. Strain the garlic from the oil using a sieve. (see Note #2)
Use immediately or store in an air-tight container for up to 4 days in the refrigerator.
Notes
Ensure the heat is low to prevent burning and producing a bitter taste.
As an alternative, you can leave the garlic in the oil if you plan to store the garlic cloves.