You should leave pumpkins on the vine as long as you can. They'll only ripen and change color while still growing. Unlike tomatoes and bananas, pumpkins won't improve after picking.
There are a few ways to determine that pumpkins are ready to harvest. First is the color. If you're growing pumpkins for autumn decorations or Halloween carving, color is probably an important factor. Once the pumpkin on the vine reaches an appropriate color, it can be harvested. The color may deepen if left on the vine, but if you're happy with the hue go ahead and pick it.
The skin of the pumpkin hardens as it matures. Stick your thumbnail into the outer skin of a pumpkin. If the skin is hard and your thumbnail doesn't easily penetrate it, it's ready to cut free. If it feels soft and you leave a deep incision, leave it on the vine a little longer.
Thumping a finger against a ripe pumpkin should produce a hollow sound. It's hard to describe what a hollow sound is to someone who hasn't heard it. Kind of like a drum but not as loud or vibrant. To me this is the hardest way to determine harvest time.
If a heavy frost or freeze hits, the leaves will be killed, the plant can no longer support the pumpkins, and the vine dies back. Some gardeners wait until this point to harvest. I've discovered small fruit that I didn't know I had after a freeze clears away the big leaves. The pumpkins can handle light frost temperatures but they should be harvested and protected before a hard freeze. Freezing temperatures can damage the flesh.
When harvesting, wear gloves. The vines and stems are prickly. When you've decided that's it time, use shears or a knife to cut through the stem. Particularly for Jack-O-Lanterns leave enough stem to act as a handle for the lid. Three or four inches is enough. If the vine has died back the pumpkin should be easy to separate from it manually, but I usually cut it to leave a clean stem.
The vines, dead or alive, are ready for the compost pile. They can add a lot of green component while still fresh and are a good balance to dried leaves that usually appear about the same time as harvest.
After cutting the pumpkin from the vine, it should cure for at least 10 days if you plan to store it. Curing further hardens the skin and keeps in moisture so the flesh stays fresh for long periods. If you don't plan to store it, you don't need to go through the curing process and it can be used right away. Properly cured pumpkins can be stored at 50F degrees (10C) for two or three months and even as long as six months in a dark, well-ventilated room.
After curing, or to help facilitate curing, bring the pumpkins indoors. This should definitely be done before freezing temperatures damage them. Don't stack the pumpkins or allow them to touch each other; this can cause soft spots and potential rot. Avoid placing them near apples and other ripe fruit. The ethylene gas they emit can shorten the pumpkin storage life.
That's all there is to selecting pumpkins for harvest and curing. Collecting the seeds for eating or future planting is always a good idea too. If you have pumpkins in your garden and you haven't harvested, take a close look at them because it may be time.