Generally we can use Force Quit to kill a program, but sometimes that won’t work.
I had that case come up yesterday. A window was showing up on my screen for the program, but every time I moved the cursor over it I got the ‘spinning beachball’. The program didn’t show up in ‘Force Quit’, nor did an icon show up in the Dock for the program.
Rather than having to reboot, I was able to terminate the guilty process using Activity Monitor. I opened Utility Monitor by going to Finder ==> Go ==> Utilities ==> Utility Monitor. I scrolled down through the list of running processes until I found the one causing the problem (it actually showed that the process was not responding).
To kill the process, I clicked on it to highlight it in the list, then on the ‘X’ in the top hand corner of the Activity Monitor window. That killed the process and the errant window disappeared from my desktop.
See my other Mac articles