heat the oil over medium heat in small stock pan for a few minutes, just until it begins to smoke. Remove the pan from the heat and let it cool for a few minutes. Be mindful that olive oil has a low smoking point, and if heated up too much for too long its flavor can change.
Slowly and carefully pour the oil over the crushed chili pepper, making sure that the oil completely covers them. If necessary, use a spoon to stir so that all the chili is submerged. If using the whole chiles, add them now, and stir.
Set the oil aside to cool for at least an hour or two.
Once cooled, you can taste the oil. If it's to your liking, strain the oil to remove the crushed chili peppers. If you'd like more heat and flavor, cover the oil and allow it to infuse overnight or for as long as desired before straining—Once it's to your liking strain into a jar with tight lid seal. If using whole chilies can leave 1-2 in however the spice will amplify with time.