Once the spaghetti is cooked, drain it while reserving some of the starchy pasta water. Add the spaghetti to the pan with the oil and garlic. Toss the pasta around until its coated (this is where you can add in the starchy pasta water to keep the pasta moist if it looks too dry).