A pumpkin is a specific type of squash. If you can either 1) carve a face into in and set it on your doorstep on Halloween, or 2) bake it into a tasty pie served on Thanksgiving, it's a pumpkin. Also, if it vaguely looks like one of the above mentioned gourds, but is strictly ornamental, you can call it a pumpkin, even though it probably isn't. Otherwise, it's a squash.