Trick-or-treating or "Guising", is a customary practice for children on Halloween in many countries. Children in costumes travel from house to house in order to ask for treats such as candy (or, in some cultures, money) with the question "Trick or treat?". The "trick" is a (usually idle) threat to perform mischief on the homeowners or their property if no treat is given. In North America, trick or treat has been a customary Halloween tradition since at least the late 1950s. Homeowners wishing to participate in it usually decorate their private entrance with artificial spider webs, plastic skeletons and jack-o-lanterns. Some rather reluctant homeowners would simply leave the candy in bowls on the porch, others might be more participative and would even ask an effort from the children in order to provide them with candy. In the more recent years, however, the practice has spread to almost any house within a neighborhood being visited by children, including senior residences and condominiums.

The tradition of going from door to door receiving food already existed in Great Britain and Ireland in the form of souling, where children and poor people would sing and say prayers for the dead in return for cakes.[1] Guising children disguised in costumes going from door to door for food and coins also predates trick or treat, and is recorded in Scotland at Halloween in 1895, where masqueraders in disguise carrying lanterns made out of scooped out turnips, visit homes to be rewarded with cakes, fruit and money.[2] While going from door to door in disguise has remained popular among Scots and Irish, the North American custom of saying "trick or treat" has recently become common. The activity is prevalent in the United States, Canada, United Kingdom, Republic of Ireland, France, Puerto Rico, and northwestern and central Mexico. In the latter, this practice is called calaverita (Spanish for "little skull"), and instead of "trick or treat", the children ask "me da mi calaverita" ("can you give me my little skull?"); where a calaverita is a small skull made of sugar or chocolate.

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,[1] although similar practices for the souls of the dead were found as far south as Italy.[3] Shakespeare mentions the practice in his comedy The Two Gentlemen of Verona (1593), when Speed accuses his master of "puling [whimpering or whining] like a beggar at Hallowmas."[4] The custom of wearing costumes and masks at Halloween goes back to Celtic traditions of attempting to copy the evil spirits or placate them, in Scotland for instance where the dead were impersonated by young men with masked, veiled or blackened faces, dressed in white.

Although some popular histories of Halloween have characterized trick-or-treating as an adult invention to rechannel Halloween activities away from vandalism, there is very little records supporting it. Des Moines, Iowa is the only area known to have record of trick-or-treating being used to deter crime.[24] Elsewhere, adults, as reported in newspapers from the mid-1930s to the mid-1950s, typically saw it as a form of extortion, with reactions ranging from bemused indulgence to anger.[25] Likewise, as portrayed on radio shows, children would have to explain what trick-or-treating was to puzzled adults, and not the other way around. Sometimes even the children protested: for Halloween 1948, members of the Madison Square Boys Club in New York City carried a parade banner that read "American Boys Don't Beg."[26] The National Confectioners Association reported in 2005 that 80 percent of adults in the United States planned to give out confectionery to trick-or-treaters,[27] and that 93 percent of children, teenagers, and young adults planned to go trick-or-treating or participating in other Halloween activities.[28] In 2008, Halloween candy, costumes and other related products accounted for $5.77 billion in revenue.