You can network them together using a crossover cable. One PC acts as a server/gateway to the internet and must be on if the other wants to access the internet.
Alternatively, if you have an external modem (as I do) then go via a router if you can afford one. They're not too expensive and you can add laptops and other PCs later if you need to.
We have 2 desktops, we now have 3 desktops and 2 laptops all via the router.
We just plug the PC into the router and XP does the rest.