Linux is very stable and there are very few apps that can freeze the desktop. With the gaining popularity Linux has especially since the gaming industry is moving toward Linux it's quite necessary to know a few tricks.
As I've recently discovered Cinnamon has some issues. But running apps in Wine can also cause problems.
There is a very easy way to fix it without rebooting and losing all your open apps, files and tasks
First you need to go to another virtual terminal by using the key combination CTRL+ALT+F6
Then as usual log in with your username and password. Type the name of the program that caused this
ps -aux | grep *program*
Write down the PID number.
Then you can kill it via one of the following commands:
sudp pkill -9 nameofprogramsudo kill -9 pidnumber
The first command kills it based on it's full name The second based on the PID number
When you're done switch back to your usual interface with CTRL+ALT+F7
If however your whole system freezes (it can happen), instead of using the power button to sutdown you can use the following key combination to safely shutdown your system ALT+Sys+U