Roughly peel garlic. Chop with knife or pound & grind in a mortar until it still has some texture.
Heat oil in a small skillet or a sauce pan over medium low. Add garlic and spread evenly. It should not make too loud sizzle sound at this point. Fry garlic for 6 to 8 minutes, or until garlic pieces are light golden color. Do not fry until perfect golden brown color, because it will keep darkening even after take out from oil. Key point here is low and slow, if you rush and increase heat, garlic will easily burn and end up with bitter taste.
Drain garlic through a strainer, over a mixing bowl. If you want to make chili garlic oil, add chili flakes in mixing bowl when you strain garlic and oil or just keep as garlic infused oil. If you like to, you can season chili garlic oil with some salt and sugar for more flavor.
Back to fried garlic, drain oil completely and spread evenly on a paper towel to get rid of excess oil. Cool it completely before store. Transfer to a air tight container, it will last 2 to 3 days.