How new is the iphone. I had the same problem on my 4GB iphone. What happened was that the battery was not completely charging. The phone was fine as long as it was plugged into the PC, but as soon as you took it off the USB cable...the phone would reboot, show the apple symbol, make a quick little flash, then reboot...over and over again.
If you can keep the power on, restore the phone and make an appointment at Apple Store to swap out the phone. If the phone has not been unlocked, call Apple and tell them your problem. I forgot to mention, your phone still has to be under warranty.
It's better to take it to the Apple Store, if you send it in, there is a possibility that they will run tests on it and not replace it due to it being unlocked (happened with me). The people at the Apple Stores don't care, they will swap it out immediately. Hope this helps you.