What can i do when i'm trying to get into my IPhone but when i turn it on it says Connect to ITunes?

I was on my IPhone last night and all of the sudden my phone shuts off. It happens all the time so I didn't think anything of it. It showed the Apple logo but then instead of showing my lock screen and all that it showed this "Connect to ITunes". What do I do? (I have a 3GS)

It sounds like it is wanting to upgrade itself, finish a download, or the software is corrupted and has lost you password etc.
I hope you backed up all your contacts, photos, music and a list of Apps you bought?
You can let it connect to iTunes for normal things but if it needs to do a hard or factory reset it will lose your personal data.