Well I'm assuming the printer is not a network printer. The computer that has the printer connected to it has to have file and print sharing enabled, some automatically are set to that depending upon which Operating System you're using. Also it has to be shared, so you would simple go to the printer settings and select the sharing tab and give it a name, permissions and so on. Once that's done, simply add the printer to your computer or simply browse the network through network neighborhood or my network places (depending on which operating system you're using again) and you should be able to print.
Also username and password should be on both systems. If the permission is set to everyone, I'm pretty sure you won't have to enter a username or password but add username/password in case if it does happen. I hope this helps