One example of foreshadowing in a well-known book is in Harry Potter and the Sorcerer's Stone when Hagrid tells Harry about the consequences of stealing from Gringotts, while in Harry Potter and the Deathly Hallows Harry and the others do steal from Gringotts and escape on a dragon.
Foreshadowing is used in literature in all parts of the world. Foreshadowing is when the author gives the reader clues about what might happen in the future plot of the book.
When Bilbo was using his wits to make up riddles against Gollum . . .
Thirty white horses upon a red hill . . .
It was foreshadowing for the time when he would end up having to use his wits to trick Smaug with his riddle names.
I am the clue finder, the web cutter, the stinging fly . . .