When Can You Use a Tee in Golf?
A golf tee supports the ball above the ground. Under Rule 6.2, you may use a conforming tee when playing from the teeing area in the situations that rule covers. You may also play directly from the ground.

It is not reserved for a driver
The permission concerns the teeing area and the applicable rule, not the club’s name. You can choose an iron for the opening shot and still use a tee. Tee height is a setup choice, not a requirement to use the longest club.
Do not tee up a fairway ball
Carrying spare tees does not authorize placing a ball on one wherever it lies. Play the ball under the rules that apply to its location and any relief procedure. A poor lie alone is not permission to use a peg.
The opening shot is not the only case
Rule 6.2 also covers certain returns to the teeing area and a ball still in that area after a stroke. In those circumstances, re-teeing may be allowed. Do not reduce the rule to an absolute ban after the opening attempt.
Distinguish a knock from a stroke
Accidentally knocking the ball off before making a stroke generally allows you to replace it without penalty in this situation. Making a stroke is different: the stroke can count even when you miss. Ask an official if you are unsure what happened.
Sources
Related reading
What Is a Golf Ball Marker For?
Related reading
Par, Birdie and Bogey: Read a Golf Score Relative to the Hole