This doesn't happen often, but occasionally I will try to switch to an open application (either by clicking its icon in the dock, or by double-clicking on a document that opens in that application), but instead of that application becoming active, a second, independent instance of the same application will launch (so that I will see two copies of the icon when I use cmd-tab to switch applications, two copies in the dock, etc.)
Again, this is rare, but it does happen every now and then, and it drives me nuts. It happened this afternoon with Preview.app. Usually this situation leads to one or both of the instances becoming non-responsive, requiring me to force quit. Sometimes that leads to me losing work.
There are a bunch of threads of people who want to have multiple instances of the same application, asking how to make it happen. I have the opposite question: Why does this happen, and what (if anything) can I do to prevent it?
Edited to add: This seems to be more likely to occur if one or more application is experiencing a "spinning beachball". My suspicion is that the app I'm trying to activate does not respond to a system call, so the system thinks it's not open and tries to open another copy of it.