This is a mistake many of us have made before. When the pasta is fully cooked, it begins to release starch, which makes it a bit sticky and gives the water a cloudy color. Often we think we need to dump out the boiling water and wet the pasta down with cold water instead. This isn't true! The water will only cool down your pasta without doing a thing about the starch. Also, you can make better use of the cooking water during the next step, when you begin preparing the sauce.
So what do you do, then? When the pasta is ready, remove it from the water with tongs and put it in a strainer, or move it directly to a bowl.