should be configured by default on windows XP home. If not, you can check by selecting START, Control Panels, Network Connections. Right click on Local area Connection and choose Properties. In the next window, there will be a selection box in the center of the general tab page. Look for Internet Protocol(tcp/ip). Click this onece to select it, and then click the properties button. The Obtain an Ip Address Automatically button should be checked.
The next part is having a dhcp server, or using the dhcp server of your ISP. If you have a router, it can be configured to act as a dhcp server, as can Windows server, or various linux and bsd servers. How each is configured depends on what you are using.
Hope this helps.