The select system call lets you wait for a set of file descriptors to be ready to use without causing blocking that would occur if you chose one (say to read from) and it was the wrong one (no input yet).
The rlogind program is/was excuted to permit remote logins from a Unix client machine to a Unix server machine.
It gets input from a descriptor for the remote client, writes to a descriptor for a pseudo terminal.
An application running on the server thinks its input is coming from the pseudo terminal and so sends its output there.
The rlogind daemon has to also read the descriptor for the pseudo terminal and write a descriptor to send the output to the client.
Which of these 4 operations should it try first?
The select system call lets it repeatedly chose one that will not block.