Foreshadowing happens when an author includes something in a story (a line, a phrase, and image) that gives a hint of what the eventual outcome of the story will be.
In 1984, there are many of these, at various points along the way. If you know the song that Winston is singing/trying to remember throughout the book, then that's one of them, because of the final line.
Others occur throughout the book, starting in the first chapter. Think of the slogan Big Brother is Watching You. He was watching Winston. Or the discussion of the Ministry of Love. The extra time spent describing this in the first chapter lets you know it will be important, and that Winston will eventually be part of the "official business" taking people inside.