If a program is unresponsive or the spinning beach ball of death isn’t going away, wait for a while (your Mac sometimes just needs a bit of time to think). If it is still spinning after several minutes, you can Force Quit applications by going to the Apple menu and selecting Force Quit… or by pressing option-command-esc. Use this with caution, as it can cause data loss and file corruption!