The seasonal practice of carving a vegetable and putting a light inside originates in Ireland as part of Celtic tradition; because pumpkins do not occur naturally in this part of the world, the turnip was the vegetable that was originally used to carve jack-o-lanterns. Other root vegetables, including rutabagas, potatoes and beets, may also have been used to create these veggie lanterns, which used candles, burning coal or embers to create light and were intended as talismans to ward off evil spirits. Irish immigrants likely brought the practice to the United States, and exposure to the large, internally hollow and easily carved pumpkin started a new tradition of carving pumpkins instead of root vegetables.
The term "jack-o-lantern" was initially used to describe humans carrying lamps rather than lanterns inside vegetables. An Irish legend tells about a mythical figure named Stingy Jack, a cruel man who tried to trick his way into Heaven but ended up having no eternal resting place. The story involves Jack's ghost wandering around the earth with an ember inside a hollowed out turnip. This is likely the origin of the term "jack-o-lantern" as it applies to a lantern made out of a carved vegetable. This may also be the origin of the practice of carving ghoulish faces into the vegetable.