Multiple personality disorder, or simply multiple personalities, is a psychological condition in which an individual exhibits two or more distinct personalities, often with separate memories and periods of control over the body.
In 2266, a transporter malfunction divided Captain James T. Kirk into two separate physical individuals, each with a certain set of character traits: one gentle but indecisive, the other assertive but brutal. The compassionate Kirk had to realize that the "wolf" was necessary to his functioning as a starship captain. The two aspects, when "integrated" back into a single body, helped to balance and temper one another. (TOS: "The Enemy Within")
The Kurlan people believed that each individual was a community of persons, each with its own voice, desires and outlook. A Kurlan naiskos was a ceramic statue of a person which opened to reveal many smaller figures inside. (TNG: "The Chase")
When the Enterprise encountered a huge archive from the D'Arsay system, Data was affected by the archive's sensor beams and began to display several archetypal personalities from D'Arsay mythology. He said later that there were actually thousands of people in his mind. (TNG: "Masks")
Jadzia Dax struggled with what appeared to be the repressed memories of Joran Dax, one of the previous (unauthorized) hosts of her Trill symbiont. She experienced his memories when triggered by a particular piece of music and manifested certain aspects of his personality traits. (DS9: "Equilibrium")
Later, Jadzia participated in a ceremony in which the spirits of former hosts of her Trill symbiont were temporarily channeled by her fellow Deep Space 9 crew members. Curzon Dax and Odo liked their co-existence so much they considered staying that way. (DS9: "Facets")
In 2372, aspects of both Tuvok's and Neelix's personalities were combined together when, after another transporter error, their bodies were merged into a single individual called "Tuvix". Tuvix felt he was a unique individual and wanted to stay as he was. Thus, it was only with the intervention of Kathryn Janeway that Tuvix was separated again. (VOY: "Tuvix")
In 2375, Seven of Nine experienced something akin to multiple personality disorder when a malfunctioning Borg vinculum tapped into her cortical implant and caused the neural patterns of assimilated individuals to emerge. The symptoms worsened until she began to show a different personality every few seconds, causing severe stress on her cerebral cortex and threatening her life. The crew of the USS Voyager was able to save her life by deactivating the vinculum. (VOY: "Infinite Regress")
In Diane Duane's novel Spock's World, Lieutenant Meshav (β), a Sulamid, is described as having "an octocameral brain, which meant s/he might manifest up to eight personalities. S/he tried to restrain herself from doing this too often, citing (as Jim had heard it put it) 'pity for the poor single-mindeds.' All the same, a poker game with Meshav was an interesting experience, especially considering that one personality was completely capable of hiding the contents of one's hand from all the others... not to mention from any opponent."