The history of the Jack o Lantern custom is thought to date back to an old Irish tale. The story says that a man named Jack (who was a famous trickster), fooled Satan into climbing a tree and then trapped him there by carving images of a cross in the trunk of the tree. Jack then made a deal with the devil to let him go, in exchange Jack would never be tempted by the devil again.
The tale continues after Jack dies, as he is denied access to both heaven and hell. The devil (still angry about being tricked by Jack) gives him a single ember to light his way through the darkness. The light was placed inside a turnip to keep it glowing longer. The Irish made their "Jack's lanterns" out of turnip, but when the custom came to the US, they begin using pumpkins instead of turnips.
Today there are many aspects of the holiday that are seen as common practices when celebrating Halloween