I'm not sure I entirely understand the full sequence of events here, but if you installed and used some kind of "cleaning" app, that app may have damaged your system, preventing it from starting up or causing it to crash so you can't use it without restarting. If the machine is on, but frozen, press and hold the power button until it shuts down, then press the power button again to turn it back on.
If it just goes to a gray screen or something along those lines at startup, and never gets any further than that, you probably need to reinstall the system. Hold command-R at startup to enter recovery mode, then reinstall the system. It should install right on top of the old system, repairing it without affecting any of your other files. (Though, there's always a risk to doing something like this, so if you don't have any backups, you're in a somewhat dangerous situation.)
In the future, do not use any kind of cleaning tools. See The myth of the dirty Mac.