NIS does for networks of Unix boxes what Active Directory does for networks of Windows machines, or what Open Directory does for networks of Macs.
It's a centralized place to store things like user login information, group membership, and a bunch of other information about the organization's distributed computing environment, so that all the machines have the same information without you having to go update that kind of information on each machine individually.
"Connecting through SSH to a remote server" is a completely unrelated concept that is not comparable to anything NIS does. But if both your current machine and the remote server use the same NIS infrastructure for their users and groups information, then you'll have the same username and password and numeric UID on the remote server as you have on the local server, and if you have a network home directory on an NFS server (or other fileserver) somewhere, that remote server will be able to use NIS to find where your home directory is and automount that fileserver share so that you'll have access to all your files.
NIS is used in Unix environments because it was developed in the Unix world. Aspects of LDAP, Active Directory, and Open Directory are derived from ideas pioneered with yp and NIS.