My iPhone 4 has been turing off for the past 20 minutes?

I was trying to go to google and safari kept crashing and my phone just has been on the shutting off screen for the past 20 minutes and won't go off or come back on? Is it broken it was 34% charged and its an iPhone 4 its only 4 months old?

Added (1). I wasn't using it, at all then decided to google something. It couldn't of over heated?

Overheating probably

Had the same problem the phones Batteries isn't good so I just got iPhone 5

Take the battery out
give it 15 seconds then put it back in
start your phone up

Do a soft reset. When its and when you are on your home screen double click the home button. Tap and hold the apps in the multitasking bar until the apps giggle and tap the red (-) sign to close all the apps. Once your done doing that do the soft reset. Hold down the home button and the power button for 10 seconds and let go until the apple logo appears. If this doesn't work contact apple and if anything is wrong they shuld replace the iPhone since its fairly new.

You can do a reset or by a new battery. If that domt work get a replacement

Plug it in and try again