To quit a stuck application you may use Force Quit option on Mac but sometimes the stuck application does not accept Force Quit. So, in that case you may kill the application by using commands on Terminal.
The method written below helps you to know that how can you kill an application through command line.
How to Kill An Application Via Terminal On Mac
Click on Finder
Go to Applications > Utilities and launch Terminal
Type the following command and hit Enter key
It shows all the processes and applications running on your Mac. In first left column under PID find your application to which you want to quit and note down its PID number
Just press q to exit from top
Now type the following command in Terminal and press Enter key
where 113 = application process ID
Now, to observe the change run top command again
The application with PID number 113 is not available anymore
Great post, thanks!