Press Command+Option+Esc to open the "Force Quit Applications" window. Select the frozen application and click "Force Quit" to close it.