Please explain this pseudocode involving getchar and putter : [photo of pseudocode that i don't understand][1]

Hi! I attached a photo of a piece of code that I don't completely understand. I know that getchar returns the next character from standard output and that put char puts the character on the standard output, but i don't fully understand what the EOF is and what this code is doing exactly. Also i don't get how you can add or subtract letters as it does in the if statement... 

Thank you in advance!
  [1]: https://i.stack.imgur.com/PUSHc.png