Truthfully, we really don't know nearly as much about it as we do most other disorders, which is perhaps why it's such a ripe trope in fiction.
Now imagine that this type of disconnect happens to an extent that it cripples your identity, memory, and very sense of existence, and you'll get an idea why dissociative mental disorders can cause some serious problems.
That's a tougher question than The Internet will initially tell you, because DID is incredibly controversial.
I would give you a definition for what dissociation actually is, but at this time, there really isn't any clear consensus.
The best I can do is say that dissociation involves the connections between consciousness, memory, identity, and perception.
There is some evidence that outside input may have some effect in the presentation of multiple personalities.
For instance, it typically seems to take anywhere from a few seconds to a few days for a personality to switch completely in dissociating individuals.The individual cannot handle the memories of the abuse, so alternate personalities are formed to "store" these memories and handle other life aspects.Essentially, DID forms as a type of coping mechanism to help the sufferer deal with what they experienced as a child.Often, some memories will be available to the alters that the primary will not be able to recall. The official ruling so far is that DID is caused by extreme trauma, normally during childhood.The abuse is so severe that it prevents formation of a coherent identity, resulting in memory fragmentation.Diagnosed individuals definitely have dissociative problems, and are not assumed by anyone to have control over what occurs during an episode where an alternate personality is presenting.The debate concerns where these personalities come from, not whether they exist.Dissociation is typically measured on a continuum, and you've almost certainly experienced some degree of dissociation in your own life. Read a book so intensely that you forgot where you were?Nearly gotten in a wreck because you were texting while driving? Then you've experienced some degree of dissociation.Nobody can agree on whether it exists, what causes it, at what age it typically can be diagnosed, and so forth.The fact that it is incredibly rare doesn't help.