Hold the power button down (it could take as much as 30 seconds) until the phone restarts.
If it does it again, you have no main Android installed and you'll have to reflash the firmware (assuming it's not a new phone, in which case I'd contact the seller and ask for a refund).
Since we don't know which phone it is, we can't tell you how to reflash it, so first join the Android Central Community, so you can answer in this thread and not have to repeat everything every time you respond, then come back here and you'll have a big text editor to type your response into (and a POST REPLY button to post it).