You have not given details on the brand or model of printer, so this answer is very general, but should give you a good idea what to do to install the printer. Sometimes the manufacture's website will have instructions how to do this for their specific equipment.
The easiest way to do this is to use the "Add Printer" wizard in Windows 7. From the Windows button, choose
Devices and Printers. In the window that opens, choose
Add Printer from the top of the window.
Add a network, bluetooth or wireless printer. This will bring up a window of printers found on the network. Choose the printer you want then click Next. This will search for the drivers and if they aren't installed you will be prompted to install them. There are a lot of printer drivers already available within Windows 7, so you may not have to find the drivers yourself.
If the printer is not listed, click the
The printer that I want isn't listed
Since you said you "I can ping XP PC", choose the option to
Add printer using a TCP/IP address or hostname. Follow the prompts from there.
In the event the drivers aren't found, you may have to download them from the manufacturer's website.