In the upper left corner of the screen you will find the Quick Exit button. Using this button will exit the program immediately.
But you can also leave the program by accessing menu "Start" Exit program or by pressing ALT+X. If you have changed any of the user settings or colors, the program will ask you if you want to save these or not.