Trick-or-treating began with the medieval traditions of "souling" and "guising," where people went door-to-door for food or money.