A quasar is a specific type of astronomical object formed by matter falling into a super-massive black hole. The resulting energy is released as X-rays in all directions. However, the X-ray release is most intense directly above or below the galactic plane. Observed from this view, the resulting bright object is known as a quasar.
During the original five-year mission of the USS Enterprise, Captain James T. Kirk was under standing orders to investigate all quasars, and quasar-like phenomena. In 2267, the Enterprise encountered Murasaki 312, a quasar-like electromagnetic phenomenon. (TOS: "The Galileo Seven")
In 2370, Captain Jean-Luc Picard received a priority one message from Admiral Blackwell inquiring about the current status of the ship. Responding that the Enterprise was conducting surveys of the Mekoria Quasar, she redirected the ship to assist Admiral Pressman. (TNG: "The Pegasus")
Star Trek's apparent definition of quasars differs from what is established as such in 21st century real-world science. In fact, "quasars" are always associated with supermassive black holes in the centers of young galaxies, and could therefore not occur within the Milky Way. The quasars, or "quasar-like objects", mentioned and shown in Star Trek more closely correspond to what real-world science calls microquasars.