Hold the power button in (it might take as long as 30 seconds) until the phone restarts. If it restarts back into "Fastboot&Rescue" mode, the operating system is gone and you'll have to reflash it. How you do that depends on the phone, so
join Android Central and tell us the make and model. (You'll see a response box at the bottom of the page after you've joined.)
If it restarts normally, it just means that you had a few buttons pushed when you turned the phone on (or they got pushed when the phone was in your pocket). It happens, it's nothing to get worried about. (I'd be more concerned with a phone jammed into a pocket.)