The Cabinet of Souls was an artefact of the Rhodian people, described by the Twelfth Doctor as the centre of their religion. It was said to contain a paradise where the souls of all Rhodians reside after death.
The Cabinet could also be used as a weapon, as the power of all the souls within, compressed into specks of light, were capable of effecting genocide on another species. (TV: For Tonight We Might Die) They would do this by sending the souls to burn the other soul out of existence, burning themselves out in the process. (TV: Co-Owner of a Lonely Heart) It was thus a weapon that could only be used once. It was shown that this was done by ageing them as when Miss Quill touched a spark for a few seconds, while inside the Cabinet, she was aged by a few months. (TV: The Metaphysical Engine, or What Quill Did)
According to what the Rhodian prince Charlie called a children's story that no adult Rhodian ever believed in, in the hands of a hero, the souls would take over bodies instead of just burning them. (TV: Co-Owner of a Lonely Heart)
When the Shadow Kin attacked Rhodia, Charlie took the Cabinet with him as he fled to Earth. The Shadow King Corakinus pursued Charlie so as to prevent him from using the Cabinet to wipe out the Shadow Kin. Charlie later claimed to Corakinus that the Cabinet was empty, that its legend was merely a bedtime story for children to make death less scary and that he was only keeping the Cabinet in memory of his dead people. However, Charlie lied, (TV: For Tonight We Might Die) as there were in fact billions of souls inside the Cabinet. He told Matteusz that he lied because he was in charge of protecting them, and because it meant hope that it could be used to bring them back. (TV: Co-Owner of a Lonely Heart)
Under the duress of Dorothea Ames, Charlie was told to use the Cabinet of Souls. Ames wanted Charlie to kill the killer petals infesting Shoreditch, while Quill wanted him to kill the Shadow Kin that had wiped out Rhodia and other worlds. Before he could use it, however, April MacLean, the new king of the Shadow Kin, used the Shadow Kin to kill the petals. Quill said that he could still use it to kill the Shadow Kin, but Charlie refused; Matteusz Andrzejewski saying that that would make Charlie a monster. (TV: Brave-ish Heart)
Quill and the shapeshifter surgeon Ballon unknowingly transported inside the Cabinet with the metaphysical engine to perform the surgery removing the arn inside Quill's head. They had sex in celebration, and Quill became pregnant. In trying to escape the Cabinet with only one person able to leave, Ballon used Quill's displacement gun against her, but it fired back at him. Quill then buried Ballon, and ordered the souls to show her the exit. Quill had aged several months in a short time here. (TV: The Metaphysical Engine, or What Quill Did)