As you can see in the pic, the water in my pasta has a thick white substance. All I did was water, pasta, salt, boil.
What is this substance?
Is it a sign of overcooking, should the well cooked pasta be in clear water only?
How do I avoid it?
Like MaxW said, it's starchy water. This happens because
Pasta is made from flour, water, and sometimes egg—that means it’s basically just starch and protein rolled out into different shapes and dried. It’s the starch molecules that are important. Once they’re heated in a moist environment—like your pot of water—the starch will absorb more and more water until it finally bursts. That sends little starch molecules into your water, resulting in white foam.
It is not a sign of overcooking. But your picture is a visible sign that there is not enough water in the pot.
To avoid it, use a bigger pot and use more water. You haven't mentioned how much water you have used for how much pasta. The Culinary Institute of America teaches one gallon of water per pound of pasta. Also, make sure you don't skip the most important step of bringing your water to "boiling" stage before you add in your pasta. Stir as soon as you add the pasta because this is when the first layer of starch is released and pasta can clump together. If there is not enough water at this stage, starchy water will look something similar to your picture. Stir your pasta often while it's boiling.
Edit: As it is kindly pointed out by Joe in comments, you may not necessarily need to use a full gallon of water per pound of pasta according to this article. However, you still need enough to cover the pasta and then pasta swells as well, as it cooks.
It is basically a gooey starch "gravy." Boiling noodles adds water to noodles but also extracts some starch from them. So it just starch water as if you had added flour to water.