there are myriad ways to do this:
1) see this article (below) which is a Registry edit, so do use Winrescue XP to back up your registry first http://support.microsoft.com/kb/315231
2) get TweakUI (Windows Powertoys) and
Open TweakUI (Click Start, Programs, Powertoys for Windows XP). Expand the Logon branch, and click Autologon. Turn on the "Log on automatically at......" option, type your username and password, and click Ok.
sometimes this works, sometimes it doesn't;
3) Do this:-
Click Start, Run and type CONTROL USERPASSWORDS2, and click Ok. Select the user account from the list (the account to which you want to automatically logon). Uncheck Users must enter a user name and password to use this computer option, and click Ok. Type the user account password and complete the process.
This one is the easiest and always works for me.
DO NOT use the tip which appears in the book "Windows XP Inside Out" - it makes it impossible to log on at all !!