Follow the instructions in
How to change a computer name, join a domain, and add a computer description in Windows XP or in Windows Server 2003.