Friend of mine needed some help with file sharing between XP Pro & 7: from my own experience, plus some digging, here's some basics + sites to use...
1. File & printer sharing need to be enabled on all computers involved.
2. Windows Vista & 7 have a network profile setting in Network & Sharing: it should be Work or Home; Public will cut-off sharing for privacy.
3. Windows Firewall: enable File & Printer sharing. Other firewalls: enable TCP+UDP ports 135-139 & 445.
4. If you can't ping a computer, it may be blocking ICMP: check firewall settings for that.
5. If your XP box can't access remote shares consistently, or at all, it may have a corrupted Winsock from a malware infection: there are instructions & tools online to wipe it out; you may have to plug any static IP settings back in if using such.
6. If you're just sharing a printer, consider using the LPD service: you can install it in Add/Remove Programs (its with the other Windows parts); you'll need to allow TCP port 515 on the firewall; also, in XP, the service doesn't automatically start on boot (set to automatic).
*MS: How to configure File Sharing in XP
*MS: Internet firewalls can prevent browsing & file sharing
*Windows XP Pro File Sharing
*Share Files & Printers Between Windows 7 & XP
*Repair/Reset Winsock Settings
*Allow Pings (ICMP Echo Request) Through Your Windows Vista Firewall