In honor of Halloween...
Halloween facts: The holiday we call Halloween was originally the Celtic tradition called Samhain, in which the Celts believed the veil between the worlds of the living and the dead was especially thin because of the coming of nights being longer than days in the Northern Hemisphere, allowing the living to commune with their dead relatives. When Christianity came to the Celts, church leaders co-opted the tradition by moving their tradition of All Saints Day (originally celebrated in mid-May) to the end of October, the day after Samhain. All Saint's Day was also known as All Hallow's Day, making the day before All Hallow's Eve. They also made November 2nd All Soul's Day, thus further draining the power of October 31st as Samhain.
The tradition of the Jackolantern was also based on an Irishman called Jack, who according to legend was such a horrible human being, he was even booted out of Hell. However, the Devil took pity on him and gave him a burning ember from the pits of Hell, which he promptly put into a turnip that he carved out in order to have a light to guide his way in the night. When the story came to the New World, children replaced turnips with the more plentiful pumpkins.
The tradition of trick or treating has a dual origin. The first part, the treating, came from the celebration of the afore mentioned All Soul's Day. The poor would go around town, asking for a small pastry called a Soul Cake, and generous people would bake them for the poor, as a way of showing kindness to those less fortunate, in line with church doctrines on charity to the poor. The trick part came about as unruly kids and/or young adults would go about and cause havoc, in sometimes extremely creative ways, such as disassembling an entire tractor (motor and all) and reassembling it on top of a hapless farmer's barn. Some enterprising citizens eventually got the notion that by effectively bribing these kids and young adults with treats and parties at their residences, they would try to prevent them from causing any kind of distress in the neighborhood, a tactic that, by and large, worked, and the two traditions eventually melded into the 20th century tradition we know today with giving out candies. The tradition of wearing masks was something of an off-shoot of the tradition of tricking, in that the kids/young adults would sometimes wear elaborate masks as a means of preventing themselves from being identified by authorities.