Well, before you add the spaghetti to the (big pot of) boiling water you add a handful of sea salt. Then the spaghetti. Then let it boil for about 9 minutes (if it's dried) but stir it occationally so it doesn't stick to the bottom or together. When a strand is rather flexible but has a slight resistance (you don't want mushy spaghetti) take out about 2 cups of water (a coffee cup works great) and then drain the rest of the water off.
If you are just doing buttered noodles? Turn down the burner to very low. Add some butter, salt, pepper, pepper flake to the hot pot, and when the butter is melted, add the spaghetti... and toss to coat. If it's too dry, add a little of the reserved pasta water. You want it saucy, but not wet. Then put it into a bowl and put a bit of parm (or peccorino) on top.
Different sauces need different things, but this isn't the cooking channel thread.
And yes, I like my food spicy so I go for the pepper flake.