There are 3 main approaches depending on the model of printer:
1: Connect the printer to your home network with an ethernet cable. For a lot of people with simple a simple home network this means it would have to be able to be wired into your home router.
2: Connect the printer to your home network via wireless. Printer could then be anywhere.
3: If the printer is beside one of the computers (computer 1) and does not have wireless or ethernet, i.e. only usb, then connect the printer directly to computer 1 with usb cable. Then you can share the printer out on the network via computer 1 Windows printer sharing settings, so that it is available to computer 2 and any other computers or devices. This is completely pointless if your printer is modern and has ethernet or wireless connectivity. If it has either of those, then do option 1 or 2 so you can place the printer wherever you want. Disadvantage to this option is computer 1 needs to be turned on whenever you want to print, even from computer 2.
EDIT: If you try to connect to the printers ethernet/usb and wireless at the same time this can be problematic. Often if a printer detects that you are using an ethernet cable, it can disable the wireless automatically.