What does "trick or treat" mean?

Native speaker’s answer
Rebecca
The phrase "trick or treat" comes from a tradition in the 1940s when children would go door to door asking for sweets, which is the "treat" part. If someone didn't give you sweets, you would prank them, which is the "trick" part. It's a verb during Halloween time, where kids go "trick-or-treating" dressed up in costumes asking for candy in their neighbourhoods. It's also an exclamation that kids who are "trick-or-treating" say when the people at their houses open the door for them. Ex: I like Halloween because we get to go trick-or-treating! Ex: Trick or treat!! I'm a superhero for Halloween. Do you have candy?