My guess would be that you're leaving your computer idle for a while, and your screensaver options are kicking in. There's an option that locks the computer when this occurs, requiring the current user or an administrator to unlock the computer before use can continue. It's a security feature that protects your data from physical invasion.
Right click on your desktop and go to properties. From there, go to the screen saver tab. In the "Screensaver" control area, find the checkbox labeled "On Resume, Password Protect". When checked, this will require a password when bringing the computer out of screensaver/powersave mode.
This is all assuming that you are running a Windows XP operating system, and that a period of idle is causing your computer to lock. If you are not running a Windows XP operating system, then it is possible that the Password setting is in a different place, or that the property windows will not look exactly as I described them. If the lock is not caused by a period of idle, then you have a very interesting issue and I'd like to be kept up to date on the solution, because that's something that I've never seen before.