you will need to keep the PC on which has the printer connected to it. Go to Control Panel > Printer > Right Click on the printer and select the sharing tab and enable it.
then go to the second computer, again in the printer folder in control panel and select to add a new printer and choose to add a network printer.