Halloween (e'en short for evening, hallow short for All Hallows, ie All Saints' Day Eve) has been a tradition in Scotland and Ireland for centuries. Then it got imported to America where it got corrupted and guising became twisted into the very nasty-minded "trick or treat".
The original idea was that on the Eve before All Saints all the Ghosties and Goulies were abroad because the Saints were at their least active. To avoid being recognised by ghosts who may be out to get you it was normal to go in disguise (ie guising).
Traditionally kids would knock on doors and grown-ups would try to guess who they were. The kids would be expected to do "a turn" - sing a song, tell a joke etc. They would be rewarded with traditional autumn fare such as nuts or fruit or maybe some sweets or a penny or two.
As a kid I loved it, it was great. The best houses were those where they would play the traditional Halloween games like Dookin' for Aiples, or Treacle Pancakes on a string.
England, sadly, seems to be importing the Nasty American version with evil tricks and pumpkins instead of neeps.(turnips)
Here Endeth the Lesson