Hi Joyce, Here's how Martha Stewart does it! https://www.marthastewart.com/852369/garlic-oil
As Nancy Turner says, olive oil, or favorite oil, add a few cloves of peeled crushed garlic ( the more you add the faster and stronger it happens/gets) and infuse for at least 6-8 weeks or until desired strength of flavor achieved. This is how you make all flavored oils.
Additionally, if you substitute vodka for oil, that is also how you make an essence/extract, e.g. Vanilla essence. Use several spilt vanilla beans, put in a bottle or jar and leave in a dark place for at least 8 weeks, or until desired strength reached. Leave the beans in the liquor and as you use the essence top up with more alcohol (and occasionally add another split vanilla bean/remove any spent beans) to have a never ending supply of vanilla essence!