Halloween is famous for a number of activities, including trick-or-treating in costume. Along with many contemporary Halloween traditions, trick-or-treating has roots in the ancient pagan festival of Samhain, which took place annually on Oct. 31 in what is now the United Kingdom.
During the Samhain festival, villagers would dress in frightening costumes to scare away unwanted spirits. Over time, this custom - mixed with both the Christian practice of offering prayers in exchange for food and the youthful antics of performing a trick in exchange for a gift - evolved into the contemporary practice of trick-or-treating. Immigrants to the United States brought trick-or-treating with them when they settled throughout the 1800s, though the Halloween tradition did not become widely popular until after World War II.