Q Continuum
The Q Continuum is an extradimensional plane of existence inhabited by a race of beings known as the Q.
As a race, the Q are apparently both nearly immortal and nearly omnipotent, possessing the ability of instantaneous matter-energy transformation and teleportation, as well as the ability of time travel. Their apparent abilities include moving entire asteroid belts and stars, creating alternate timelines, and affecting universal states of nature such as the gravitational constant. In fact, the only time a Q is seen as unable to do something is during a period where their powers are reduced or revoked by the Continuum. (TNG: "Deja Q", "Tapestry", "All Good Things...")
The Q claim to have always existed, with no explanation as to how they first came into existence. VOY: "The Q and the Grey"
Based on descriptions by numerous Q, including the Q later known as Quinn, as well as Amanda Rogers (the child of two Q in Human form), the Q Continuum is a highly ordered society, but is also the result of eons of evolutionary stagnation. Because of their immortality, everything possible has been done, and their omniscience has become boring. As a result, Quinn, a respected philosopher in the Continuum, stated that he wished to die – because he had no further purpose in life. The Continuum, however, denied him this act because, it was claimed, extraordinary chaos would result from such an act – his influence among the Q was expected to make this act have unpredictable social consequences, which was, actually, exactly what Quinn believed to be necessary to end stagnation in the Continuum.
Quinn was imprisoned on a rogue comet for eternity to prevent him from ending his own life, until he was accidentally released by the crew of the USS Voyager in 2372. In a courtroom hearing to determine his right to political asylum, Quinn described the Continuum as a lazy, old roadhouse along a deserted desert highway – he argued that the road could take them to anywhere in the universe, but the Q had already been everywhere. In addition, everything both Old and New had already been discussed, and so the roadhouse was silent – there was nothing left to say. Therefore, Quinn argued that being forced to remain alive was a continued burden to him, a burden that he did not want to continue to bear. Q argued that the death of a Q would create chaos in the Continuum. Voyager captain Kathryn Janeway ruled in Quinn's favor, granting him asylum. A day later, Quinn committed suicide. (VOY: "Death Wish")
As a result of Quinn's action, the Continuum was plunged into a massively destructive civil war that set the "Freedom Faction" against the traditional Q. The two factions were able to construct weapons that could even compromise the immortality of a Q. When these weapons were fired in the Continuum, this resulted in massive damage to subspace, causing some stars in normal space to go supernova. Eventually it damaged subspace to such an extent that Q outside of the Continuum lost their powers and immortality.
Q had the idea of mating with Janeway to produce a being with the powers of a Q, but the morals of a Human in order to end the war. The crew of Voyager flew through a supernova into the Continuum with help from a female Q, who had lost her powers and could not return without Voyager's help. Voyager's crew quickly overpowered the Q by using Q weapons. A ceasefire was called. Q mated with the female Q instead of Janeway and the damage to subspace was restored, making the Q omnipotent and invincible again. (VOY: "The Q and the Grey")
Later on, the new Q became an intergalactic troublemaker. He started wars between innocent races, knocked planets out of orbit, detonated Omega molecules, and created havoc in every way he could. His mother disowned him, humiliated by his actions. Q, however, followed him, cleaning up all the damage.
Under advice from Janeway, Q implemented punishment on the boy. Q dumped him on Voyager, and with the help of the "Q government" took away his powers. Junior, as he was called by his father, had one week to become a good citizen, or he would be sentenced to eternity as an Oprelian amoeba. Junior did well for the first few days, until he stole the Delta Flyer. After his friend Icheb was injured, however, he returned to Voyager. Janeway made him apologize to the ship he attacked, which was in fact Q, who masqueraded as a likely target to test his son's attitude.
When Judgment Day came, Junior was still found unworthy of being a Q, but was good enough to be a Human. After this sentence, Q threatened to leave the Continuum unless his son was allowed to stay. After further pleading, the Continuum agreed to grant the young Q's powers back to him on the condition that his father act as his guardian and supervisor in perpetuum, or at least until he could prove himself worthy. (VOY: "Q2")