For example, in the song The Gambler, by Kenny Rogers, before the gambler starts speaking, "The night got deathly quiet." Then, later in the song, the gambler dies. Or, in the movie Charade, with Cary Grant and Audrey Hepburn, Audrey says she'll give her nephew some stamps, and in the end the money is hidden in the stamps. (Oops, I sort of gave away the ending. Sorry.)
Of course, there doesn't have to be a giant plot twist coming. Good writers foreshadow their endings. The resolution to a plot's climax can't just come out of nowhere, it must come from within the story. It shouldn't be predictable, but it shouldn't come as a complete surprise, either. Thus--foreshadowing.