Kandor on Krypton
Kandor served as Krypton's capital and main cultural center. It was the original location of the Kryptonian Council, Krypton's governing body, and featured a prominent holographic representation of Krypton's sun, Rao. Throughout the city there were theaters, temples to Rao, and shining pyramids; There was a wide variety of vastly different types of architecture, as the different guilds on Krypton chose different styles for their edifice. Some towers on Kandor were even constructed entirely from Sunstone Crystal. (Novel: The Last Days of Krypton, Comic One-Shot: New Krypton Special)
The Kryptonian Council was infamous for its indecision, its lack of action, its suppression of innovation, and its corruption. Commissioner Zod, at the time head of the Commission for Technology Acceptance on Krypton, sought to overthrow the council, having been snubbed by them previously. However, he was unable to do so before the city was abducted by Brainiac.
Indeed, an alien starship arrived, belonging to the Coluan alien Brainiac, and enveloped Kandor in a force field and some sort of shrinking ray. Now-General Zod was just outside of Kandor at the time it was stolen, and attempted to fight against Brainiac's probes and save the city; but once it was made clear to him that it was to his advantage to have Kandor, and its council, gone forever, he let it go. (Novel: The Last Days of Krypton, Comic story arc: Brainiac).
Brainiac would keep Kandor in a tiny bottle on his spacecraft. It is now lit by an artificial red sun, which is presumed to be the same holographic representation of the sun, Rao, which was once just a curiosity in Kandor. Among the citizens of Kandor, Brainiac earned the nickname: "The Terror of Kandor". (The Last Days of Krypton; Legion of Superheroes episode: Message in a Bottle)
Brainiac kept the city in a bottle on his interstellar spaceship, until he was confronted by Superman who retrieved the now-bottled city but was unable to restore it to its full size.
Rescue by Superman
When Brainiac came to Earth to harvest more cities for his collection, he encountered Superman, who was challenged by Brainiac's formidable technology, but was able to rescue the cities stolen from Earth and return them to their normal size. However, there wasn't enough energy in Brainiac's shrinking ray, so Superman took it back to his Fortress of Solitude.
Kandor now resides in the same bottle in the Fortress of Solitude, its inhabitants waiting while Superman looks for ways to restore them.
The city was updated for the story arc Superman: Godfall.
Kandor was originally restored to full size, and its inhabitants could resume their civilization. However, in different tellings of the story, this happened at different times and in different ways.
Superman was able to restore Kandor on a planet orbiting a red star, which the Kandorians dubbed Rokyn. Superman and Supergirl would visit here often, learning more about their history and about Kryptonian society.
In New Krypton Special, Superman was able to rescue Kandor from Brainiac, and restored it to full size on Earth's north pole. All of its inhabitants began to gain superpowers under Earth's yellow sun.
Message in a Bottle
In the Legion of Superheroes episode "Message in a Bottle", it was revealed that a device known as The Messanger was left in Kandor to prevent Krypton's destruction. During the episode, Imperiex was searching for the device, but Brainiac 5 was able to find it and use it first, by activating memories from his ancestor, Brainiac. Under Superman's encouragement, Brainiac 5 restored Kandor, and put it on a re-formed planet Krypton.