Foreshadowing is when there is a hint given earlier on in the text that makes reference to something that happens later in the story. Sometimes a foreshadow, or hint, can be obvious and others are not so obvious. One obvious foreshadowing can be found in Shakespeare's "Romeo and Juliet" at the beginning of the play. "A pair of star-crossed lovers take their life" (Prologue.6) bluntly tells the audience what will happen before the play even starts.
A less obvious example of foreshadowing can be found on the first page of Salinger's The Catcher in the Rye, where Holden says,
"I'll just tell you about this madman stuff that happened to me around last Christmas just before I got pretty run-down and had to come out here to take it easy" (1).
"Madman stuff?" "To come out here to take it easy?" Here Holden is mentioning things that the reader has no clue about in the beginning but will understand by the end after everything is revealed. Sometimes a reader won't notice a foreshadow until later after the whole story is revealed. At that point, it is fun to go back to the foreshadow that was presented earlier on and reread it to get a better perspective on why the author wrote the story that way.
Foreshadowing is a literary technique in which the author reveals a tiny bit of information that gives indication to what may happen later on in the story. This helps heighten suspense and builds up to the final (generally dramatic) ending. I find that I see a heavy use of foreshadowing in regards to negative matters as opposed to positive ones. A thunderstorm, and decision to head off into the dark woods in which wolves can be heard, an almost-collision with a raven with particularly beady eyes that flash red momentarily...these all bode negatively and helps guide the readers forward in the plot.