Foreshadowing means having an indication of a future event. To foreshadow is to signify, or be warned of a future event.
RICHARD III (Duke of Gloucester): Go, tread the path that thou shalt ne'er return. Simple, plain Clarence! I do love thee so, That I will shortly send thy soul to heaven, If heaven will take the present at our hands. <span>But who comes here? the new-deliver'd Hastings? </span> This text implies that Clarence will face death and that Richard will be the one to send him to die.
The theme of a story is important because a story's theme is part of the reason why the author wrote the story. The author has a message he wants to share with readers, and he uses his story as a way to get that message across.