Place the oil and the garlic in a medium pot. Cook over low heat low for 20 minutes until the garlic is soft and golden brown. Do not allow the garlic to overbrown, or it will become bitter.
Allow to cool, strain out the garlic cloves, and use the oil in the recipe of your choice. The garlic oil will keep well sealed in the fridge for up to two weeks. The garlic cloves should be refrigerated and used within a few days.
Notes
There are a number of good ways to make garlic oil, but this is my favorite method. The reason I like it so much is because it yields two dividends. Garlic oil (check), and also poached softened lightly browned garlic cloves, also known as garlic confit, which are immensely useful in their own right.