I own an HP a1211n whose harddrive recently passed away, RIP.
I want to buy it a new hard drive but I'm not sure which will be compatible. I know it needs to be a SATA, but I don't know what further I need to look for.
Pretty much any desktop 3.5" SATA drive should be fine. SATA 3 Gbps and SATA 6 Gbps are both backwards compatible, so even newer drives should work without any problems.
Note: If you're going to reinstall XP on an Advanced Format drive, you'll need to align partitions since XP isn't AF–aware. See your drive's documentation for details (generally they'll provide a recommended utility for this).