If the phone has a removable battery, pull the battery, wait a second, then put it back. The phone will be off.
If not, hold the power button down - it could take as long as 30 seconds - and the phone will restart. (If it doesn't, the phone is pretty hosed - that simulates pulling the battery.)