Macs aren't infallible, and at some point during your time using them you'll come across a situation in macOS where an app has become unresponsive, leaving you without access to its contents and functions, and only a continually revolving beachball for your troubles.
If the beachball stays on the screen for more than a few minutes and you can't interact with the app's interface, this usually indicates the app in question has crashed, which means it's time to force quit it and restart the app to see if you can pick up where you left off in the hope it won't crash again. Read on to learn how.
If the app is acting up, hold down the Option key and right-click its icon in the Dock to reveal a Force Quit action in the popup menu.
There's a second option for quitting an unresponsive app, and it may be one of the more intuitive solutions.
Alternatively, you can open the Force Quit applications interface by pressing Command + Option + Escape all at once.
You can also force quit misbehaving Mac apps using Activity Monitor. You can find it in the /Applications/Utilities folder.
The main window lists all the apps and processes currently running on your Mac. You'll notice the order jumps around a lot. That's because you're seeing the list being updated every five seconds to show changes in individual app usage statistics.
Note that if the app or process has files open, force quitting it may cause you to lose data. Also, bear in mind that if the process you force quit is used by other apps or processes, those apps or processes may experience issues.
If your work in the crashed app hasn't been saved recently either manually or automatically, then there's not much you can do to retrieve your work other than check Time Machine.