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 (NCC-1701), 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 the current status of the ship. Responding that the Enterprise was conducting surveys of the Mekoria Quasar, she redirects the ship to assist Admiral Pressman. (TNG: "The Pegasus")
In 2376, Tuvok described Kelemane's planet as having a high rate of rotation "like a quasar". (VOY: "Blink of an Eye") Also, Icheb informed Seven of Nine that when he was on the Borg cube: he "never thought about what was outside, such as pulsars, quasars, and nebulas...". (VOY: "Child's Play")
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.