I've done this a few times now. Simply, whenever you buy olives from the deli counter or those jars of peppers in olive oil, keep the oil in the jar and you can add anything to it like cloves of garlic, black pepper corns or a few chilli flakes. You can use it to sweat off onions in a pasta sauce or whisked up with some lemon juice for an easy salad dressing. It keeps for ages and you can top it up with fresh olive oil and garlic as and when you need to.
That is all.