The history of Halloween seems to invite misinformation - the entire holiday is fraught with it. Many urban legends suggest that children are in danger of receiving apples full of razor blades; a vile Satanist may lurk behind every mailbox; and all unfamiliar-looking candy is likely ecstasy, apparently handed out by some poor soul overburdened with too much MDMA lying around. In reality, of course, reported cases of tainted Halloween candy are next to nothing, and the chances you will become a victim of human sacrifice is roughly the same as being slain by a meteorite.
Halloween in history is just as murky; it has a few separate origin points that all tie together, and its celebration often cobbles together local customs from preexisting holidays. It undoubtedly owes something to the Celtic festival of Samhain, but it's hard to say with certainty what traditions come from where, especially since many of the only written records derived from the Romans. We can at least be sure that the early Halloween was not, as was suggested, a holiday when druids showed up to your house to kill your sheep unless you gave them money.
The Protestant colonies were not exactly receptive to the idea of Halloween. The Puritans were so strict that the people of Boston banned Christmas celebrations in the mid-17th century, considering it blasphemous to observe a day with the vaguest of pagan origins; obviously, a holiday based on spooky ghosts and divination rituals did not stand a chance. Parts of colonial America did have festivities, but they weren't widespread, and most Americans at the time viewed Halloween as strange and foreign.
Later immigrants, especially Irish immigrants fleeing the potato famine in the mid-19th century, brought over customs that were absent in the US, helping to universalize a holiday that might have otherwise flown under the radar.
There are little to no references to the practice of trick-or-treating as we currently recognize it in the United States before the 1930s. Instead, early accounts in America mostly focus on the mischief, which ranged from harmless - such as ringing doorbells and running away - to dangerous, including breaking windows and setting fires. Knocking over water tubs was also popular. Especially notable was Halloween of 1913 in Sheffield, AL, when neighborhood kids planned to fill the town cannon with gunpowder and detonate it in the middle of the night.
The kids were, unsurprisingly, not experts at measuring out gunpowder, and they instead set off an explosion so loud that townspeople had assumed there was an earthquake. The cannon itself was thrown hundreds of feet from its foundation, and all of the windows on the hotel facing it had shattered.
The first jack-o'-lanterns were fashioned from turnips and potatoes to ward off "Stingy Jack," a legendary figure who was so insufferable that he was barred from entering Heaven and had previously tricked the Devil into guaranteeing that he wouldn't go to Hell either. In some versions, Jack convinces the Devil to turn into a coin so they can buy alcohol and get drunk together. In any case, Jack wound up with nowhere to go, doomed to wander Earth, lighting his way with a burning ember inside a hollowed-out turnip - hence "Jack of the Lantern."
Halloween and its predecessor holidays have always been considered ideal for fortune-telling and divination; Samhain was, after all, a time when the veil between the worlds of the living and dead was at its thinnest. Naturally, the best application of this access to the realm of the dead was to ask the ghosts which boy you would marry. A woman would pare an apple, throw the skin over her shoulder, and peel's resulting shape would indicate her future husband's initials. Or, she could approach the first man she saw on All Souls' Day, and that guy's name would resemble her future husband's.
Alternatively, she could walk around a church three times and make a wish. The Irish also made barmbrack, bread that had a bunch of junk baked into it - usually fruit - and indicated your future based on what your slice contained: a coin indicated wealth; a cloth indicated bad luck; and a ring, of course, indicated upcoming marriage, evidently the single issue that anyone cared about back in the day.