Spaghetti takes around 15 to 20 minutes to cook.
Once you get the water in the pot to boiling then you can turn it down to simmer to avoid the water from boiling over the pot.
You should stay near the stove while cooking spaghetti because you'll need to stir the spaghetti at least a few times every minute or 2.
Once the spaghetti becomes soft then it should be done and ready to eat and if it's not soft enough then you can return it to the stove and boil it for another few minutes.