Halloween (or Hallowe'en) is an annual holiday observed on October 31, primarily in the United States, Canada, Ireland, and the United Kingdom. It has roots in the Celtic festival of Samhain and the Christian holiday All Saints' Day, but is today largely a secular celebration.
Common Halloween activities include trick-or-treating, wearing costumes and attending costume parties, carving jack-o'-lanterns, ghost tours, bonfires, apple bobbing, visiting haunted attractions, committing pranks, telling ghost stories or other frightening tales, and watching horror films.
The ancient Celts believed that the border between this world and the Otherworld became thin on Samhain, allowing spirits (both harmless and harmful) to pass through. The family's ancestors were honoured and invited home while harmful spirits were warded off. It is believed that the need to ward off harmful spirits led to the wearing of costumes and masks. Their purpose was to disguise oneself as a harmful spirit and thus avoid harm.
Trick-or-treating is a customary celebration for children on Halloween. Children go in costume from house to house, asking for treats such as candy or sometimes money, with the question, "Trick or treat?" The word "trick" refers to a (mostly idle) "threat" to perform mischief on the homeowners or their property if no treat is given. In some parts of Scotland children still go guising. In this custom the child performs some sort of trick, i.e. sings a song or tells a ghost story, to earn their treats.
The practice of dressing up in costumes and begging door to door for treats on holidays dates back to the Middle Ages and includes Christmas wassailing. Trick-or-treating resembles the late medieval practice of souling, when poor folk would go door to door on Hallowmas (November 1), receiving food in return for prayers for the dead on All Souls Day (November 2). It originated in Ireland and Britain, although similar practices for the souls of the dead were found as far south as Italy.
(source: http://en.wikipedia.org)