To get into recovery mode the phone needs to be turned off completely. Once off, you'll need to plug into PC/Laptop and then press and hold power button and volume up. From the recovery menu, you'll be able to clear cache partition.
If it stays on for about 10 minutes before restating again, then you should be able to turn it off.
To get into Safe Mode, press hold the power button when the power options come up, tap and hold 'power off' until it turns green and says 'Safe Mode'. Tap on it again and the phone will then turn off and boot into safe mode to see if problem still happens.