Ah, foreshadowing. Those tiny little breadcrumbs that give the readers something to guess at and figure out. Done the right way, when the plot device comes to fruition, your readers will swoon because they were able to put it all together without it being spelled out to them. No one likes a predictable storyline, but everyone loves to be able to figure out what happens. And this is where knowing exactly how and when to use foreshadowing can help you turn that good story into a s0-damn-I-good-couldn't-put-it-down novel.
Plant a question in the reader's mind.
The point of foreshadowing is to plant a question in the reader's mind — not to give away all the answers. A man comes home to find his gun missing from the gun rack on his wall. You, the reader, will question where the gun went to. And when that gun shows back up later in the story, you'll say “Ah-ha!!” But hopefully you won't say “I knew his wife grabbed it.”
Speaking of Chekhov's gun…
Anton Chekhov once said “Remove everything that has no relevance to the story. If you say in the first chapter that there is a rifle hanging on the wall, in the second or third chapter it absolutely must go off. If it's not going to be fired, it shouldn't be hanging there.” Although I am more lenient on the whole second or third chapter time limit, I do agree with the rest. If it's in there, it should be relevant to the story or move the plot along. This is in part because of a reader's love to try to figure it all out. No one likes to finish a book thinking “but what about the fact that he came home and his gun was missing? What was that all about?”
Be selective about which events you want to foreshadow.
Foreshadowing your major events is crucial. But not every event needs to have that seed planted. If you start foreshadowing every single event throughout your novel, not only will you dilute the importance of the events themselves, but you'll also drag out the story into an excruciatingly slow tale. Foreshadow pivotal moments, and leave the rest alone.
Be careful of your timing.
Place a foreshadow too early in the story, and your readers may forget all about it by the time the event comes to pass. Place it too late in the story, and it won't strike the reader enough to give that all-important “ah-ha” moment. The size of the shadow should also be relative to how far in advance the breadcrumb is being dropped. A foreshadow being told several chapters in advance should almost be invisible, perhaps with a second shadow somewhere inbetween that and the plot point in question.
Make sure the size of your foreshadowing matches the payoff.
How many times have you read a book or watched a movie in which the foreshadowing was so great, and the tension built up so much, that you actually felt let down when the event finally happened? The more you foreshadow an event, the bigger that event needs to be. Your readers won't care about how amazing the book was up until that point. The only thing left in their minds will be that let down, and it will be mentioned in every review.
Foreshadowing is an important piece to your story. Whether you plan out your novel and add in the foreshadows along the way, or plant the majority of your foreshadowing during revisions, you and your readers will be glad you spent the time developing them.