The lamps were originally carved from turnips and designed (as their pumpkin counterparts were) to dispel evil spirits, or, in some cases, vampires.
There is a legend, obviously concocted, about a man named Stingy Jack who is cursed to walk the Earth with only a turnip lantern to guide him. He provided the name for both the lanterns and for another phenomenon known as ignes fatuus. (see related link)
They were carved out of turnips.
Turnips
The common belief is that jack-o-lanterns originated in Ireland. The first jack-o-lanterns were carved out of turnips, potatoes and beets.
The Irish carved jack-o-lanterns out of turnips and rutabagas. The Welsh and Briton did this too. It was nailed to their doors to ward off angry spirits.
Turnips.
they are eaten
"Turnips" and sometimes potatoes.
Turnips were carved instead of pumpkins.
a carved out pumpkin face like a pumpkin
It's a tradition to carve pumpkins on Halloween, when the pumpkins are carved they are called jack-o-lanterns.
they are carved because its fun for kids and they make your place look spooky
A jack-o-lantern is a carved pumpkin, a pumpkin is just a plain vegetable.