In "The Pit and the Pendulum," Poe gives little clues along the way that foreshadow coming events; this helps the reader to predict, in a general way, might happen next. The first time we meet the narrator, he is groggy and being interrogated; he mentions the Inquisition. This helps the reader to know that he has been accused of a lack of conversion to the Catholic church, and will most likely be killed (if you know anything about the Inquisition, that is). However, the first bit of foreshadowing comes when the narrator tells us that he does not receive "the dread sentence of death." This foreshadows the fact that he is not going to die, but, that something else horrible will happen to him.
Foreshadowing also occurs as the narrator regains consciousness in his prison chamber for the first time. Fears flash through his mind about torture; he states,
"here came thronging upon my recollection a thousand vague rumors of the horrors of Toledo. Of the dungeons there had been strange things narrated—fables I had always deemed them—...Was I left to perish of starvation in this subterranean world of darkness; or what fate, perhaps even more fearful, awaited me?"
This declaration of his fears is in fact foreshadowing of coming torture. He mentions that he has heard rumors of the awful torture that had occurred at Toledo, and that he fears that too would be his fate. Granted, we don't know how he'll be tortured, but torture in general is foreshadowed.
A more obvious instance of foreshadowing occurs when we first learn of the scythe attached to the pendulum. We understand instinctively that the scythe is going to slowly and painfully slice him to death. How will he free himself? Earlier in the story, we learned of rats and how they swarmed his food and the chambers; this perhaps was a foreshadowing of the ingenious plan that the narrator uses to free himself from the pendulum. Those are just a few examples of foreshadowing in the story; I hope that helped!