While quitting an application in OS X generally involves pressing Command-Q or selecting "Quit" from the application menu (immediately to the right of the Apple menu), there are times when an application may be hung up and require force-quitting. This kills the running process without any checks for unsaved data, and while not always recommended, may sometimes be the last resort for restoring an application (and sometimes the system) to a functional state.
If you find yourself with an unresponsive application and see a spinning color wheel cursor whenever you attempt to interact with the program, then you might consider force-quitting it. To do this, you can choose Force Quit from the Apple menu, and then choose your application in the window that appears and click the "Force Quit" button.
While this is not too inconvenient of an approach, there are a couple of alternative ways you can force-quit the current application, by using hotkey combinations.
Instead of accessing the Force Quit window from the Apple menu, you can use Option-Command-Escape to bring it up. If you press and hold Option and Command, and then tap the Escape key twice, you will force-quit the current application. You can then continue to tap the Escape key in succession to continue force-quitting other applications.
This approach for force-quitting can be convenient; however, since successive taps of the Escape key will continue to force-quit other programs, there is a chance that you might inadvertently do so, especially if the system is hung up and you tap the Escape key repeatedly, only to have all the queued hotkey inputs be processed at once.
A second approach to force-quitting is to hold the Shift key along with the rest of the force-quit hotkeys -- this will instruct the system to act only on the foremost application. So, if you have TextEdit in focus and it is unresponsive, simply press Shift-Option-Command-Escape, and you will force the program to exit.