From Nookipedia, the Animal Crossing wiki
Throughout October, Candy is stocked and sold in Tom Nook's Store, taking the place of either tools or flowers. There are four types of Candy (green, red, yellow, and blue), but all of Nook's Candy appears orange, making it hard to distinguish what color Candy he is selling.
When Jack appears in the town, the villagers and Tortimer will be dressed like him. If the player is caught by villagers outside, they will ask for Candy. If the player doesn't have any on them, the villager will play a trick on the player, transforming one of their items.
Unlike villagers, Jack won't chase the player, making him easy to distinguish from villagers. Jack can be spoken to and given a piece of Candy in order to receive furniture from the Spooky Series, but will disappear once he has received a piece of Candy and re-appear in a random location.
Spooky music will play outside in the town, and there will be no rain or clouds throughout the night.
In Animal Crossing
In Animal Crossing, from 6:00 P.M. until 1:00 A.M., the player can go around their town where all the villagers are found wandering outside. If the player is seen by the villagers, they will chase them. If he or she is caught, they will be forced to give Candy to the animal. If they do not concede Candy, they will be punished by having their clothes or their items transformed. The villagers are all dressed like Jack, the self-proclaimed Czar of Halloween, including Tortimer: in a dark blue cloak and a Jack-O'-Lantern mask. Jack and Tortimer are the only two that do not chase the player, which makes them easy to be told apart. Tortimer will give the player a Model of Katrina's Tent when spoken to. Jack can be spoken to as many times as the player desires, in order to receive furniture from the Spooky Series.
In City Folk
Halloween was absent from Animal Crossing: Wild World, but returns in Animal Crossing: City Folk. Unlike the original Animal Crossing, not all villagers go out on Halloween night - those who remain inside become targets for trick-or-treating. Approaching a villager while indoors will result in the villager giving the player candy, but only if the player is wearing a costume which makes up a Look in GracieGrace. An example of an appropriate Look is the witch's hat and cloak, which are sold throughout August, September and October, and make up a suitably spooky costume. Costumes don't necessarily have to be spooky, however.
In addition to trick-or-treating indoors, from 6:00 P.M. until midnight, villagers will chase the player outside upon seeing them, and if the player is caught by villagers outside, they will ask for Candy. If the player doesn't have any on them, the villager will play a trick on the player, resulting in one of the following:
Unlike villagers, Jack won't chase the player, making him easy to distinguish. If Jack is approached by the player without having any candy on them, Jack will give out one of four items: a Pumpkin Head, Moldy Shirt, Patched Shirt, or a Jack-in-the-Box. Refusing to give candy to Jack four times will result in obtaining all four of those items. Otherwise, if the player gives Jack candy, Jack will give the player a piece of furniture from the Spooky Series.
In New Leaf
Halloween is carried out the same as in City Folk, but with a few extra details. On Halloween night, the player's goal is to scare the villagers in his or her town. To prepare for this, during the month of October, players should buy masks from the Able Sisters, and candy from Timmy and Tommy's store. Speaking to villagers during October may reveal to the player what they are scared of. The player may also have the chance to give villagers a piece of candy in exchange for finding out what costumes scare the other villagers.
On Halloween night (6 PM - 12 AM), the majority of villagers will be in their homes; the rest will be dressed as the "Pumpkin King" and will try to trick the player. The player has three tasks they can do: