In my experience, NFS runs in cooperation with NIS or Yellow-Pages (yp) services that keep users and groups in sync across a gaggle of network connected hosts. If you don't have yp, you need to spend some effort keeping your users and groups organized among all connected hosts. Larger sites use LDAP as a more modern replacement for NIS.
When host-A users access a drive that is physically connected to host-B, the host-A process user goes through a service on host-B that maps users and groups. For
example, user=sam maps to user=dilbert. The file write then happens using dilbert's permissions, ownership, and so on.
See Linux NFS Howto
I hope this helps,