As a noun trick or treat is the act of knocking on doors and asking for candy, while threatening pranks if the food is not provided. It has morphed into the greeting children use on Halloween, and no vandalism is suggested.
As a verb it becomes trick-or-treat and makes trick-or-treating, trick-or-treated, and trick-or-treats.
A child (or adult) can be a trick-or-treater. If used as an adjective it should also be hyphenated (e.g., trick-or-treat bag).
Sometimes if it is the name of an official event, the phrase is capitalized, but it does not follow the capitalization rules of Halloween.