Well, that depends on the file sharing protocol, and the client application.
For example, if you're using AFP file sharing and connecting from a Mac then the user would typically use the Finder -> Go -> Connect to Server where they enter the server name. They'll then be prompted for a username/password to authenticate (and that's checked against the server directory).
If you're using FTP, then the client application will have fields for providing username and password when you intiiate the connection.
If you're using SMB file sharing... it's the same thing - the client will have options for providing a username and password when the user connects.
So it's all about the client application, at least as far as file sharing is concerned.