To foreshadow is to predict something or to give a hint of what is to come. If you could take a stereo apart and put it back together at age five, it can foreshadow a successful career in electronics.
The verb foreshadow is often defined as "warning" or has a suggestion of something bad to come, though sometimes it's more neutral or shows examples of both good and bad predictions. Dark gray clouds foreshadow a thunderstorm, just as spring showers foreshadow May flowers. What is foreshadowed doesn't always happen, though. A story might not foreshadow a happily-ever-after ending, but then it takes an unexpected twist, and the villain turns out to be a hero.