Q appeared to the crews of several Starfleet vessels and outposts during the 2360s and 2370s. As a consequence, all command level officers in Starfleet were briefed on his existence thereafter. One such briefing was attended by Benjamin Sisko in 2367. (DS9: "Q-Less") Q typically appeared as a Humanoid male (though he could take on other forms if he wished), and was almost always dressed in the uniform of a Starfleet Captain. (VOY: "Death Wish") In every appearance, he demonstrated superior capabilities, but also a mindset that seemed quite unlike what Federation Scientists expected for such a powerful being. He had been described, in turn, as "obnoxious," "interfering," and a "pest". However, underneath his acerbic attitude, there seemed to be a hidden agenda to Q's visits that often had the best interests of Humanity at their core.
Q was first encountered by the Federation when he appeared aboard the USS Enterprise-D in early 2364. He warned the crew of the Enterprise that Humanity should return to their home Star System or be destroyed. Q 21st Soldier Q appearing as a soldier of the Third World War When he encountered resistance, Q placed Humanity on trial, with Jean-Luc Picard and his command crew as representatives. Q accused Humanity of being a "dangerous, savage child-race." Picard managed to strike a deal with Q, however, and submitted to a test of conduct to prove that Humanity had evolved beyond its previously savage state. The Enterprise's mission to Farpoint Station served as this test. The Starfleet crew sufficiently proved their evolved state of being by discovering and assisting a Spaceborne entity that had been coerced by the Bandi to take the form of a Starbase. Q disappeared, but promised the crew they had not seen the last of him.
The next time Q appeared on the Enterprise later that year, he created a bizarre and deadly "game" for the ship's crew, in order to demonstrate that he had given Commander William T. Riker Q-like abilities. His motives for this were that Humans had a desire to grow and explore, which the Q did not have or understand. Q wanted Riker to join the Continuum so they could understand and possess this desire because, if they did not, Humanity could one day surpass the Q. Q and Picard settled on a bet that if Riker rejected his offer, the Q would leave Humanity alone forever. Ultimately, Riker rejected those new powers, and Q was forced back into the Continuum.
In his third appearance in 2365, Q presented himself as homeless, and expressed an interest in joining Picard's crew, his reason being that Humanity would eventually push into uncharted territory and would need a guide, as they were ill-prepared to face what they would find. Q even offered to renounce his powers to prove that his offer was genuine. However, when Picard vehemently declined (inspired by believing that Humanity could handle any threat), Q hurled the Enterprise into the path of a Borg cube. Ultimately, Picard had to beg for Q's help in escaping from the pursuit of the Borg ship.