Horseshoes are considered a good luck charm in many cultures. The shape, fabrication, placement, and manner of sourcing are all important. A common tradition is that if a horseshoe is hung on a door with the two ends pointing up (as shown here) then good luck will occur. However, if the two ends point downwards then bad luck will occur. Traditions do differ on this point, though. In some cultures, the horseshoe is hung points down (so the luck pours onto you); in others, it is hung points up (so the luck doesn't fall out); still in others it doesn't matter so long as the horseshoe has been used (not new), was found (not purchased), and can be touched. In all traditions, luck is contained in the shoe and can pour out through the ends.
In some traditions, any good or bad luck achieved will only occur to the owner of the horseshoe, not the person who hangs it up. Therefore, if the horseshoe was stolen, borrowed or even just found then the owner, not the person who found or stole the horseshoe will get any good or bad luck. Other traditions require that the horseshoe be found to be effective.
One reputed origin of the tradition of lucky horseshoes is the story of Saint Dunstan and the Devil. Dunstan, who would become the Archbishop of Canterbury in AD 959, was a blacksmith by trade. The story relates that he once nailed a horseshoe to the Devil's hoof when he was asked to reshoe the Devil's horse. This caused the Devil great pain, and Dunstan only agreed to remove the shoe and release the Devil after the Devil promised never to enter a place where a horseshoe is hung over the door.
Another theory concerning the placing of horseshoes above doorways is to ward off Faeries (the Celtic kind); the theory being that Faeries are repelled by iron and as horseshoes were an easily available source of iron, they could be nailed above a door to prevent any unwanted, otherworldly guests. One can see how the custom, as people began to forget the stories concerning the Fair Folk, eventually morphed into a simple good luck charm. It is also possible that the Romans, when arriving in Celtic countries, came across horseshoes nailed above doors and simply borrowed the concept of horseshoes as good luck charms, failing to understand the background of the Celtic custom, and made their use more widespread.