Any time you copy (
M-w) or cut (
C-w) anything in emacs, it is added to the kill-ring (emacs’ version of a clipboard). This keeps a history of all the stuff you have previously copied or cut. After you have pasted (yanked in emacs-speak) text with
C-y, you can use
M-y as the next key to cycle through the history of all previous text that was cut or copied.
M-y runs the command
yank-pop, but this can be substituted with fancier ways of using the kill-ring that we may come back to in due course.