"Chekhov's gun is premised on the notion that the physical details of a story should relate to the plot, or should not be included. The term comes from a letter Anton Chekhov wrote to a colleague: 'One must not put a loaded rifle on the stage if no one is thinking of firing it.' In literature, Chekhov's gun refers to a situation in which a character or plot element is introduced early but not referenced again until much later within the narrative. This device is used in much of modern literature and film: A seemingly trivial event turns out at the end to be pivotal to the story's outcome. Similar to this literary device is a 'plant.' A 'plant' is a preparatory device that repeats throughout the story. Upon arriving at the resolution, circumstances change enough to cause the 'plant' to take on a new meaning."
From Dede Truitt:
"This part where I take the gun is like, duh, important."
This is Wikipedia, of course, so I have no idea whether or not Anton Chekhov actually made the statement above, but it is an idea that a lot of people hold. Certainly a lot of movies seem to be assembled with this idea in mind.
On one hand, you do have to establish the things which are going to appear (and be significant) later on in the story. For a negative example, halfway through the movie Tough Guys Don't Dance, the protagonist suddenly has a dog, which is almost immediately killed, and he's pissed off about that. It doesn't mean anything to the audience, however (when I saw the movie, it got a laugh), since there had never been any previous indication in the film that the character even had a dog, let alone that he cared about it.
As Al Schroeder (the creator of Mindmistress) pointed out recently, it was common in early issues of the Fantastic Four comic book for the story to start with Reed Richards demonstrating a new invention (often with comical results), and then that invention would prove very important later on in the story.
But this does not mean that the opposite is true, that everything at the beginning has to end up being significant. Details included at the beginning of a story, even if never referred to again, can make the whole thing more believable and realistic. Many Sherlock Holmes stories begin with some description of Holmes' personal habits, or a list of other adventures, most of which are never mentioned again ("...the adventure of the Paradol Chamber, of the Amateur Mendicant Society, who held a luxurious club in the lower vault of a furniture warehouse, of the facts connected with the loss of the British bark Sophy Anderson, of the singular adventures of the Grice Patersons in the island of Uffa, and finally of the Camberwell poisoning case.").
And when Holmes and Watson are off after a criminal, Holmes often asks his trusted friend to bring along his old service revolver. This signifies to the reader that the situation is going to be serious and potentially dangerous, but there is still the likelihood that Holmes' intelligence will allow for a non-violent resolution.
This is true of Archie Goodwin (Nero Wolfe's assistant) as well. He had a rule for himself that he would never leave the house unarmed on any errand connected with a murder (no matter how trivial the errand itself might seem to be). In almost all cases, though, that gun stays in his shoulder holster.
If the reader has a reasonable expectation that every weapon mentioned will eventually be fired, you've just removed a fair amount of suspense about how the story will end. Now, admittedly the actual quote from Chekhov says that somebody has to be thinking about firing the gun, which is different from actually firing it, but two other quotes on wikipedia (and the actual example, from Uncle Vanya) involve shooting the thing, not just thinking about it.
After all, if a loaded gun is placed in an inhabited room, somebody will think about using it.
I have one character who is usually armed, and I can't remember a time when he's even drawn a gun, let alone fired it.
If everything pays off, and the audience knows to expect that, then the story becomes mechanical and airless. As Roger Ebert put it once, you can feel the presence of the screenplay, determining the action.
Nowadays, when I see a gun reveal early in a movie, I just laugh, since I know it will inevitably turn out to be (duh) important later. Unlike in real life.
Later: Further discussion of this point, in various places, brought out one additional factor, which is genre expectations. A gun being revealed in a romantic comedy, for example, is not the same as a gun being revealed in a mystery story. If you suddenly insert a gun into a romantic comedy, there should be a good reason.