A. P. Chekhov once said in conversation "if in Act I you have a pistol hanging on the wall, then it must fire in the last act". This principle is universally known as Chekhov's Gun, one of the foremost rules of foreshadowing. Basically, any object noted in a story that isn't at first directly developing plot, characters, or setting must later become so. Brandon Sanderson has a companion rule: anything of importance in a story should be foreshadowed at least three times.
My ninth grade English teacher didn't teach me a whole lot, but she did open my eyes to the strength of foreshadowing. If a character mentions something it must become important later. For example, if Roy the blacksmith says "I could have sworn there was a horseshoe in the furnace before I used the chamber pot" someone or something must have stolen it. Either that or Roy has some mental ailment.
The principle of Chekhov's Gun is one of the reasons I try to keep my prose tight. If I start padding my word count with description I'm bound to mention things without any intention of them becoming plot points. Some things can slip by, such as setting details, at no concequence. I use those as wisely as I can manage.
In cinema, Chekhov's Gun almost doesn't apply. There are so many things littering the scene that nothing in the background can violate the rule. However, if the camera pans in on something specific, the principle becomes applicable. Prose lacks this problem/situation since most peripheral aspects can and should be left out. The principle originally referred to plays, so obviously it applies to them.
Chekhov's Gun, and other foreshadowing rules, should be respected at all costs. The only excuse is the use of a red herring, an intentional attention deterrent, although those are tough to get right. Do you adhere to Chekhov's Gun?