The first Jack-o-Lanterns were made in Ireland out of hollowed-out turnips. A piece of coal was inserted into the hollow and the "lantern" was meant to guide the way of poor old Jack who wasn't welcome in Heaven but was also barred from entering Hell for tricking the devil. According to legend, the devil gave this crude lamp to Jack so that he could walk the earth forever in limbo. When the Irish brought this tradition to America, they apparently decided that pumpkins were easier to carve than turnips, and the modern-day Jack-o-Lantern was born!
Although there are many theories on the origin and history of Halloween, it is generally accepted that Halloween dates back to an ancient Celtic festival known as Samhain, or the Celtic New Year. It was believed that the spirits of everyone who had died during the year would return on the eve of Samhain to seek living bodies to possess for the following year. The Celts would dress in ghoulish costumes and hold noisy revels in an attempt to frighten away these spirits. Food and drink was also offered to pacify the dead. There are many tales of unfortunate souls being burned at the stake because they were perceived to have been possessed by one of the returning spirits. Around the turn of the first century AD, Romans abandoned this custom of human sacrifice in favor of the burning of effigies.
In North America, trick-or-treating began to develop as a Halloween tradition during the 1920s, but the European tradition of going house-to-house collecting food at Halloween goes back at least as far as the 16th century. In Britain and Ireland, there are many accounts of people going house-to-house in costume at Halloween, reciting verses in exchange for food, and sometimes warning of misfortune if they were not welcomed.