Quasars are objects like stars but they are the most distant objects that we can see. But they are very bright and can be seen on Earth. Such great distances tell us that they are very energetic.
They are actually centre of Active Galaxies. The centre of so many galaxies may rest in a supermassive black holes. Around the black holes are matter falling into them. The matter has high temperatures nd shine very brightly. Some of these Active Galatic Nuclei outshine the galaxies.