It dont happens often, but even in OS X application hangs sometimes. Here is a few different ways to force quit applications.
First method: Force quit currently active application with keyboard
This is probably the quickest way if you know the key combination.
When the application is active on the screen, hold down for a few seconds
Command + Options (ALT) + Shift + Escape
Second method: Use the Force quit application
Here is another quick method, and should work even if the application is completely unresponsive.
Hold down Command + Options (ALT) + Escape. This will start up the force quit application. Select the application and press Force Quit.
Third method: Force quit from the Apple menu.
Might not work if the menu is frozen too, but easy to remember.
Press the apple logo in upper left corner, and hold Shift.
You will see the Force Quit [Application]
Fourth method: Force quit from dock
If the application is completely frozen it might not work, but is also easy to remember. Specially if you have a MS Windows background. Option (ALT) + Right click the application (two finger click on a Macbook) and select Force Quit.
Thats four easy methods. There are more. You can use unix commands from the terminal too.
Happy quiting!