Spaghetti doesn't take too long too cold so make sure to watch the spaghetti often and stir it once in awhile after it comes to a boil.
Spaghetti takes around 12 minutes to fully cook and become soft enough to eat.
That means after the water starts to boil it takes 12 minutes from that time so you begin timing the cooking of the pasta after the water starts boiling.