The Q were a mysterious race of virtually omnipotent and omniscient "higher-beings" who made up, and were governed by, the Q Continuum.
The true form of the Q is unknown as their true appearance is regarded as incomprehensible to beings of the three-dimensional universe. (VOY episode: "Death Wish") To interact with the 3-D realm, the Q presented themselves in the guises of the species they interacted with, and were readily able to change the appearance of their avatars. (TNG episodes: "Encounter at Farpoint", "Hide and Q" & TOS - The Q Gambit comic: "Part 3")
The exact origin of the Q is equally unknown. Quinn once implied that the Q had begun their history in a manner similar to the Humans and Vulcans, (VOY episode: "Death Wish") with Q even fearing that the humans would one day follow a similar path (TNG episode: "Hide and Q") before later claiming his people had always existed as they were. (VOY episode: "The Q and the Grey")
Though Q once claimed to James T. Kirk that he could manipulate space/time as easily as Kirk could "change the water in a fishbowl", (TOS - The Q Gambit comic: "Part 1") Quinn claimed the Q were not omnipotent, though he did not elaborate on any of his species' limitations. (VOY episode: "Death Wish") Nonetheless, the Q were powerful enough to teleport vast distances, "misplace" asteroid belts, collapse galaxies, and even travel outside of the universe. (TNG episodes: "Q Who", "Deja Q", "True Q") Such was their power that they regarded private planets as toys for their young. (TOS episode: "The Squire of Gothos") A single Q was able to completely alter the history of two separate universes. (TOS - Star Trek—Legion of Super-Heroes comic: )
Sufficiently powerful entities could pose threats to the Q however with the forces of 0, The One, Gorgan, and (*), bringing the Q to their knees. The latter two were even able to evade capture by their foes. (TNG novel: Q-Strike) Equally, when forced into a war with the Pah-wraiths, the Q were brought to the brink of defeat, with Q even confessing to Kirk that, in their native dimension, the Q were not the gods they were in the 3-D universe but as mortal as humans. Being at the nexus of the Bajoran wormhole, an interdimensional crossroads, stripped Q of his powers. (TOS - The Q Gambit comics: "Part 5", "Part 6")
Despite interacting with less evolved species across time and space, the Q culture was heavily stagnant and sterile that by the 21st century, Quinn felt he had done and seen literally everything in the universe. (VOY episode: "Death Wish") During the Q Civil War, the more conservative Q sought to end interaction with other species as a way of preserving this culture while the other faction sought to bring change to their race. (VOY episode: "The Q and the Grey")
The Q were capable of granting their power to others, (TNG episode: "Hide and Q") and readily capable of stripping them away. (TNG episode: "Deja Q" & VOY episode: "Death Wish") Likewise, a Q could renounce their powers. (TNG episode: "Q Who")