Here's how to cook spaghetti squash, along with tips for getting long noodles, how to easily cut through the hard shell, and how to tell if the squash has gone bad.
Preheat the oven to 400ºF and line a baking sheet with parchment paper to prevent sticking. (You can grease the pan with oil, if you prefer.)
Use a sharp, sturdy knife to cut the squash in half. You can cut it crosswise or lengthwise, but I find that crosswise is the easiest and gives you the longest "noodles" later.
Use a spoon to scoop out and discard the seeds in the middle of each squash half. Place the squash halves cut-side-down on the pan, then roast in the oven at 400ºF until tender. about 45 to 60 minutes.
You can tell the squash is done when the shell gives easily when pressed with the back of a fork, or you can check to see if the shell is easily pierced by the tines of the fork. Remove the squash from the oven and allow it to cool for 10 minutes before handling.
Use an oven mitt or towel to hold the squash, as it will still be hot. Using a fork, scrape the cooked flesh out of each squash half into a bowl. Use the squash right away with your favorite sauce, or in your favorite recipe.
Cooked spaghetti squash can be stored in an airtight container in the fridge for up to 1 week. Freeze it for up to 3 months.