Iphone 3gs keeps going to apple logo?

I have an iPhone 3gs (NOT jailbroken) and it keeps going to black screen then the apple logo. Its doing the same thing on my iPad 2 also.

You will have to restore your iPhone
1. Hold home and power buttons down until screen is completely black (it may reboot once or twice, just wait until it's completely black.)
2. Hold down home button FIRST, and as you are doing that connect your USB cable that's hooked up to the computer with iTunes.
3. Wait for the iTunes recovery logo to appear on your iPhone
4. Restore with iTunes.