Why does my pasta stick together?
Because starch released from the surface of the pasta forms a sticky gel, and if the strands are in contact while that is happening, they bond. Everything that works to prevent it addresses either the concentration of that starch or the movement of the pasta.
Too little water is the main cause. Pasta sheds a lot of starch in the first couple of minutes, and in a small volume of water that starch concentrates rapidly into a thick, gluey liquid. A large pot with plenty of water keeps the concentration low. It also means the water returns to a boil quickly after the pasta goes in — in too little water, the temperature crashes, the pasta sits limp in hot rather than boiling water, and sticks.
The second cause is lack of movement. A rolling boil keeps the pasta circulating so strands do not rest against each other. Stirring in the first minute or two, when the surface is at its stickiest, matters far more than stirring later.
Oil in the water is the classic advice and is largely a waste. It floats on the surface rather than coating the pasta, and any that does adhere makes sauce slide off later.
After draining is where most sticking actually happens. Pasta left sitting in a colander cools, the surface starch sets, and it fuses into a block. Get it into the sauce immediately, or toss with a little sauce or a spoonful of the cooking water. Do not rinse it for a hot dish — rinsing removes the surface starch that helps sauce cling, though it is correct for a cold pasta salad.
Fresh pasta is stickier than dried, and needs more water and closer attention.