Try pulling the battery out for a few minutes, then see whether it's any better.
If not, and you are not rooted (or more specifically, don't have a custom recovery) then you may have to do a factory reset. This usually involves booting the phone while pressing some combination of buttons (depends on phone model) in order to get into recovery mode, after which you can reset the phone. Try wiping cache first, then the factory reset if that doesn't work.