Star Trek: The Next Generation brought forth a plethora of fantastic characters. My personal favorite is Q. This character appeared in the pilot ep of NextGen and re-appeared consistently throughout the seven seasons NextGen was on the air. Played by the MARVELOUS actor/director John De Lancie, Q was a vastly entertaining force for chaos on the show. Whenever he appeared, you knew you were in for some crazy times.
I think initially, Q was meant to be a major villian for the show. After all, how do you beat a creature who is all-knowing & all-seeing with unlimited control over time & space? That sounds like a worthy villian to me! But in watching Q's appearances, he comes across more as a teacher than anything else. While he did get some sadistic entertainment from pushing and prodding at the various characters in NextGen, DS9, & Voyager. There was always a lesson to be learned. He's like that teacher you hated in school, but in retrospect realized that all the crap they put you through made you a better student and person.
That's what makes Q such a powerful character for me. Despite the whimsy and fantasy, Q's methodology always had a deeper meaning. To this day, I find Star Trek's greatest flaw is that they never made a movie where Q made an appearance.