this happened to my S3 a year ago before I lost it.
If you are lucky it is a POWER BUTTON jam.
you can either press it repeatedly until it works again,
or you can do what I did (tried everything else):
open up the phone, remove the power button (so it stops restarting)
you can either solder a...
thanks for the reply,
the battery did take a slight dip into water before, but it powers on the phone. I also used a friends S5 battery it does the same thing, so I'm assuming its not the battery :(