1. Cook the spaghetti according to the package instructions until al dente.
2. While the pasta is cooking, heat olive oil in a pan over medium heat.
3. Add minced garlic to the pan and sauté for about 1 minute, being careful not to burn it.
4. Drain the cooked spaghetti and add it to the pan with the garlic.
5. Toss the pasta with the garlic and olive oil until well coated.
6. Remove from heat and mix in the grated Parmesan cheese.
7. Season with salt and black pepper to taste before serving.