Halloween celebrations extend back hundreds of years.  What has changed over the centuries are the reasons for dressing up in scary costumes and the mischief.  These days are usually done by children for fun.  In the past it was done by adults and taken seriously.

It was known as "All Hallows Eve", a festival first celebrated by the ancient Celts in Ireland.  On the night of October 31st, which was then the official end of summer, families would deliberately make their homes cold and undesirable to drive out or keep  out spirits and ghosts.  They believed that on October 31st the spirits of people who died during the previous year would take over the body of a living person or animal for the next year before moving into the afterlife.  To scare the spirits away the families would dress up as demons, goblins and witches, then parade inside and outside their house banging pots and pans and making as much noise and commotion as they could.  They would join other people in town at a large bonfire that would honor the sun god for the summer harvest and at the same time drive away all the spirits trying to enter town.  And pity anyone who looked or acted like they may already be possessed.  They would be sacrificed in the fire as a lesson to other spirits thinking about possessing the bodies of any other people in town.