In Ubuntu, it sometimes happens where a program locks up, and using the X or close button just doesn’t do anything. I frequently encounter this when k3b has a crashed burn. I’ve seen a few ways of closing it, but nothing as convenient as the close button. Several have suggested going to terminal and typing a command or three to close it. I think that’s just too much to ask, as I didn’t have to do that in DOS or Windows.
Fortunately, I found a shortcut that *is* as convenient as the close button. You can add a “Force Quit” button to your panel, by right clicking on the panel and choosing “Add to Panel“. You’ll see an icon that looks like a cracked screen. Drag it to where you want it on your panel, and you can use it when that pesky program just won’t go away.