What does " /bin/sh <$(tty) >$(tty) 2>$(tty) " mean?

The command plan the launch of a command (sudo at now), the planned command is a shell which has your console as a standard input, standard output and standard error. The $(tty) is replaced here by something like /dev/pty/0 which depends of your console. This is needed because the planned jobs are launched by a daemon without TTY redirection.

The tail -f /dev/null just wait forever (or a Ctrl-C) and avoid interaction with the TTY, and then between the shell from where you launch this command and the root shell. Without it, I guess that you have 2 shells in parallel which read your TTY and what you type could be interpreted randomly by one shell or the other.