Before the stocking, there was a boot, and before Christ was born, there were other gods. In Northern Europe, children often filled boots with carrots and hay for the god Odin's flying horse, Sleipnir. Odin left the children presents in return for their kindness.
Later, Christian saints took the place of the old gods. Saint Nicholas lived in 4th C. Turkey, and was known for his generosity. Since the time when his legend came to Europe, Dutch children have put shoes beside their fireplaces for St. Nicholas' Day. This tradition began as a way to feed St. Nicholas' horse, but with time, the horse disappeared. Then St. Nicholas, or sinterclaus, put a present into the shoe of a child because the child was good. Dutch immigrants brought the shoes to America in the 17th Century.
St. Nicolas heard about this and wanted to help. He quietly went into the father's house in the night and left a gold ball (or a bag of gold) in some stockings that were hanging by the fireplace to dry. The young women and their father were overjoyed to find this gift in the stockings.
Then again, it's also possible that the custom came from another belief: one Christmas Eve, Santa Clause dropped some gold coins as he came down the chimney. They fell into a stocking that was drying by the fire. After that, children regularly hung stockings by the fire in the hope that Santa would drop something when he traveled through the chimney.
Fast forward to 1823. That year, Clement Clarke Moore made up a poem for his kids that talked about Christmas stockings:
'Twas the night before Christmas, when all through the house
Not a creature was stirring, not even a mouse.
The stockings were hung by the chimney with care,In hopes that St Nicholas soon would be there. …"
excerpt from "A Visit from Saint Nicholas"
(1823: Clement Clarke Moore)
The poem was an instant hit. It was republished in many newspapers. Christmas stockings became immensely popular--and remain so to this day.
Typically, a Christmas stocking is filled with things like oranges (said to represent St. Nicholas' golden ball) and chocolates. Small toys may be put into it, as may decks of cards. Sometimes more important gifts are put into a stocking, small items like a piece of jewelry or a memory card or a pen drive. You can even slip an iPod or an iPhone case into a stocking.
In our house, my parents had a rule about Christmas morning. It was one of the few days they could sleep late. My brother and I were not to disturb them before 8 a.m. But "Santa Clause" always came on Christmas Eve to leave us stockings: there would be fruit so we wouldn't be too hungry. There were often toys or small books to entertain us. Sometimes, we found tiny games that we could play with each other while we waited. Now, so many years later, on the rare occasions when we can spend Christmas together, my brother and I still make Christmas stockings for each other.