There are a couple of ways you can go about closing a program when it is not working properly.
1. Click on the apple logo on the top left corner of the screen.
2. Scroll down and click on "Force Quit."
3. Select program and click on "Force Quit."
Another option is to select the program on the Dock (icons on the bottom of the screen) by right-clicking it and then clicking on "Quit."