I was first introduced to it in the Okanagan valley, where a market gardener--likely of Italian heritage--sold one to me and told me how to cook it.
Here's how. Cut it in half vertically. (easier said than done sometimes) Take out the stringy bits and the seeds with your hands or however you can.
Place each half upside down on a baking sheet (covered with parchment paper) and bake for about an hour or until soft when pierced with a fork.
The "spaghetti" part can be eaten just as it is, but is relatively flavourless. Without calories to speak of, but also without taste. So during this time you might want to prepare a simple tomato sauce or roast some halved cherry tomatoes with olive oil and garlic just until they're soft--either or both of these would be delicious mixed with the "spaghetti". Have some grated parmigiano or montasio cheese on hand.
Take out the squash, turn it right side up on a serving plate, and dig into the insides with two forks, lifting and shredding the strands that give it its name. They do look like spaghetti, but in the interests of honesty I must say that once you have it cooked, it will have no flavour unless you doctor it up considerably as per these suggestions.
At the very least, stir in some butter, salt and pepper, and grated cheese, to taste. Add roasted tomatoes or tomato sauce if you like. It occurs to me that if you had some Bolognese meat sauce, it, too, would be delicious mixed with this, and provide some protein.
You may mound up the "spaghetti" in the hollowed shells for a nice presentation, or put it into an attractive bowl.
I think of this as a summer dish, it is lovely as a side dish for chicken or cutlets.