the tail -n 3 is to list the last three lines in the file
It would be more accurate to say it outputs the last 3 lines of the input. In this case, the input to tail is the output from ls -ltr. So the final result is the ls -l output for the 3 most recent files, from oldest to newest.
If you're still having trouble understanding this, try:
ls -ltr > tempFile
tail -n 3 < tempFile
tempFile contains what goes through the pipe when you do ls -ltr | tail -n 3