The key to how to cook pasta successfully is to use a large pot with lots of rapidly boiling water. Do not attempt to save on the washing up by using a smaller pot and never use the absorption method.
This process is the same for long and short pasta but not for lasagna, gnocchi nor cannelloni.
Pour boiling water into a large roomy pot. Don't fill it to the rim, but between half and 3/4's full. Add a little salt and bring to rapid boil. If you'd like it to be even tastier, add a stock cube.
Throw in the pasta.
Read the instructions on the packet as to how long it will take to cook as thin or fine pasta will take less time than a thicker walled pasta. But generally, it will take 15 to 20 minutes to cook.
Keep the heat always on high with water at rapid boil the entire time. That's why you never fill the pot too full with water as otherwise it will spill over.
Whether it is long pasta or short pasta/ macaroni, cook only till al dente'. This means the result is soft but is still slightly hard inside. That's when it is cooked perfectly!
Taste test and with practice you'll get to know this al dente texture.
Take it off the heat immediately and drain in a colander. I don't drain it completely dry and leave it still slightly wet and put it back in the pot.
Pour a little olive oil and stir through. This stops the cooked pasta sticking together. Try not to add too much oil - it's hell on the hips.
Click on the image to open out a larger photo with instructions for that particular step.
More suggestions on how to cook pasta dishes: