Once again, Maarten Schmidt looked at the data. It was 5 February 1963, and he was analysing a bright point of light in the sky, an object that appeared like one of the galaxy's hundreds of billions of stars. But he now realised it was not a star at all.

It was something two billion light years away, far beyond the edge of the Milky Way. For it to be so distant yet still so bright in the sky, it must be extremely luminous – much brighter than anything anyone thought was plausible.

Schmidt, an astronomer at the California Institute of Technology in the US, had discovered something new: the first of a class of objects he would later dub quasars, short for "quasi-stellar radio sources".

Today, astronomers know quasars to be among the most remarkable objects in the cosmos: the hottest and brightest cores of distant galaxies. Powered by enormous black holes at their centres, these beacons shine across space and time, allowing astronomers to probe and map the far-flung corners of the Universe.

Quasars are extreme in almost every way. They can outshine their entire galaxies; their black holes can be billions of times more massive than the Sun; their temperatures reach tens of millions of degrees; and some of them fire jets of charged particles into space that can reach almost light speed.

But before Schmidt realised that the first quasar, dubbed 3C 273, was something extraordinary, it had been a puzzle. It was one of many so-called radio galaxies that astronomers were discovering in the 1950s.

If it was a star, it was a strange one

These galaxies produce radiation at radio wavelengths, and astronomers were busily cataloguing these radio signals and matching them with objects visible in the night sky at the locations of the signals. Generally, these radio galaxies appeared as faint smudges suggestive of a galaxy.

The 3C 273 radio signal, though, overlapped with a bright point of light. The point looked like a star that happened to lie on the path between the 3C 273 source and Earth, and at first, that is what Schmidt thought it was.

But then he measured its spectra – how the light is split into its constituent colours – a basic piece of information that reveals an object's chemical composition and its distance. Spectra make a pattern of vertical lines, each glowing at specific wavelengths.

3C 273 had a pattern unlike any he had seen before. Normally, it would be easy to identify the bright lines that represent a star's hydrogen gas. But in this case the spectrum was all over the place, and no one could figure out what it was. If it was a star, it was a strange one.

Schmidt started to write a paper describing the puzzling results. "While I was writing it, I looked at the spectrum again and suddenly I realised there was something regular about it," he would recall at a symposium commemorating the 50th anniversary of his discovery.

This regularity turned out to mean that the spectrum was actually shifted way over to the right, towards the redder end. In itself that is not weird. This redshift, as it iss called, is a universal phenomenon that allows astronomers to measure distances.

It was a stunning discovery because stars shouldn't do that

When an object is moving away from an observer, its light is stretched towards longer wavelengths – the red end of the spectrum. A similar form of stretching affects sound waves too, which is why a police car siren lowers in pitch as the car speeds away from you. The faster an object moves, the more the wavelength gets stretched.

Because the Universe is expanding, objects that are further away from us are moving much faster than nearby objects. So by measuring a redshift, astronomers can calculate an object's speed and thus its distance.

But the redshift that Schmidt measured was much bigger than what anyone would expect for a star. "It was a stunning discovery because stars shouldn't do that," Schmidt said. The Milky Way is only about 100,000 light years across, while 3C 273 turned out to be two billion light years away – clearly much too far away to be one of our galaxy's stars.

To shine as bright as one from such a distance, 3C 273 has to be producing prodigious amounts of energy. But how? In 1969, Donald Lynden-Bell, an astronomer now at the University of Cambridge, had an idea: supermassive black holes.

A black hole is an object so massive and dense that its gravitational pull reins in even light. If it sits alone, it is dark. But if it is surrounded by lots of gas and dust something spectacular can happen, reasoned Lynden-Bell.

When that matter gets too close, it will fall into the black hole, forming a disc that spirals in like water circling a drain. And as the gas and dust falls, it releases energy. Through a variety of complex processes, that energy ultimately becomes heat and radiation. Lots of it.

They discovered that nearly all galaxies have supermassive black holes at their centres

Sometimes, the black hole's powerful magnetic field channels some of that matter into jets that erupt from the black hole's poles. Those jets, containing charged particles, can reach almost light speed, making them some of the fastest bits of matter in the Universe.

When all this happens around a supermassive black hole at the heart of a galaxy, you get a quasar: a violent environment that allows researchers to probe the physics of extreme conditions.

Immediately after Schmidt's discovery, astronomers found more quasars. And over the decades, they have learned that a quasar is just one type of a whole category of "active galactic nuclei" (AGN).

These are the centres of galaxies hosting supermassive black holes that devour gas and dust. Roughly 10% of all galaxies have some activity at their centres. They come in different flavours, producing radiation at various wavelengths. Some are stronger in ultraviolet, others produce more X-rays, radio waves, or far infrared. Quasars, which are seen in about 1% of galaxies, are the brightest of the bunch.

For a while, astronomers thought quasars, and AGN more generally, were simply a special breed of galaxies that happened to harbour supermassive black holes. But in the 1990s, thanks to the Hubble Space Telescope, they discovered that nearly all galaxies have supermassive black holes at their centres.

At some point in its past, every normal galaxy – including our own – must have been active

The telescope allowed astronomers to measure the velocities of stars in the cores of galaxies, and infer the strength of gravity and thus the amount of mass at their centres.

The cores, it turned out, almost always contain lots of mass in a compact space. The only thing that dense is a supermassive black hole millions or billions times as massive as the Sun.

"Previously, people thought that the black holes were only in this few percent of galaxies that had active nuclei," says Meg Urry, an astronomer at Yale University in the US.

Our own Milky Way is not exempt. By the 2000s, astronomers measuring the speeds of stars at the galaxy's centre concluded that there must be a supermassive black hole nearly four million times heftier than the Sun.

Now a more unified story was coming into focus. Most quasars and AGN appeared early in the Universe's history. That suggests galaxies were more active in their youth, when they had plenty of gas and dust to feed their supermassive black holes.

But eventually, that gas ran out, having either disappeared into black holes or turned into stars. Black holes could only nibble here and there. AGN dimmed and quasars became less common.

Even without galactic collisions, quasars or AGN can burst back into life

The implication is that at some point in its past, every normal galaxy – including our own – must have been active. The Milky Way's black hole is not massive enough to have powered a quasar, but it was still likely to have been active to some degree.

Once dormant, however, galaxies can switch back on when the gas between stars gets disturbed; for example, during collisions and mergers between gas-rich galaxies. The collision channels the gas towards the galaxy's centre, where the hungry supermassive black hole awaits. With more fuel, the galactic nucleus awakens.

The Milky Way may become active again, too, as it is scheduled to slam into the Andromeda Galaxy in about 4 billion years.

But even without galactic collisions, quasars or AGN can burst back into life. The process of how a black hole devours gas and dust is complex, and the activity is often intermittent. In fact, in just the last year astronomers have discovered "changing look" quasars that have suddenly turned off.

"You look at it, and it's a quasar," says Adam Myers, an astronomer at the University of Wyoming in the US. "Ten years later, it's gone. It's just a galaxy."

It appears that a black hole somehow affects the overall properties of its galaxy

In astronomy, where things happen on scales of millions and billions of years, a decade is a flash. If these quasars really are shutting off over such short periods – whether temporarily or for good – they offer a rare opportunity to better understand how black holes feed, and stop feeding.

Only a few of these dimming quasars are known, but future surveys may uncover many more, Myers says.

The switching off and on of quasars is not just a cosmic curiosity. Quasars likely influence how galaxies evolve over time.

When quasars turn on, they produce jets and outflows of ionised material that sweep away much of the gas in their galaxies. This gas is the raw material that forms stars. Without it, star formation shuts off, preventing galaxies from growing further.

The influence of a galaxy's black hole is felt even after its activity declines. In 2000, astronomers found that the mass of a galaxy's black hole is proportional to the average speed of its stars. In other words, it appears that a black hole somehow affects the overall properties of its galaxy.

Quasars likely influence how galaxies evolve over time

"That was mindboggling," says Urry. Even though a supermassive black hole is huge, it is only about a thousandth the mass of its entire galaxy. No one expected a black hole to have such an outsized influence.

Beyond galaxies, quasars are helping astronomers explore the evolution and fate of the entire Universe. Because quasars are so bright and distant, they help astronomers measure the size of the Universe. The key is in finding a certain pattern in the distribution of millions of quasars in the sky.

When the Universe was less than a million years old, it was a hot soup of charged particles. Random fluctuations born out of the Big Bang created sound waves that echoed through this primordial soup. As the Universe expanded and cooled, the vibrations froze in place.

Those vibrations, called baryon acoustic oscillations, manifest themselves today as subtle ripples in the distribution of galaxies throughout the Universe. Scientists understand pretty well how these oscillations formed and expanded, so they can calculate how big the ripples should be today. Astronomers can then analyse the distribution of quasars to measure how large the ripples appear to be.

Because quasars are so bright and distant, they help astronomers measure the size of the Universe

By comparing their calculations to the apparent size of the ripples, astronomers can then deduce the distance to the ripples. It is similar to the way you might calculate the distance from you to a tree by comparing the tree's true height with its apparent height at your spot: the smaller the tree looks, the farther away it is.

"Because quasars are so bright, you can make these maps to huge distances," Myers says. Like the first explorers who used the stars to navigate and map the earth, astronomers can use quasars to map the cosmos. "It's just that these maps are the largest maps ever made."

Quasars are already some of the most distant objects known. But to make better and deeper maps, astronomers must find quasars that are even farther away.

Discovering a quasar has become routine

The most distant to date is ULAS J1120+0641, which is so far away that its light has taken 12.9 billion years to reach us. That means the quasar is a window to a time when the Universe was only 770 million years old.

But the existence of such distant quasars opens up another quandary.

The supermassive black holes that power quasars need time to grow, either from consuming gas and dust or from merging with other smaller black holes to become a supermassive one. But no one knows how black holes like the one at the centre of ULAS J1120+0641 could become supermassive so soon after the formation of the Universe.

"It's not easy to collect that much stuff on that short of a timescale," Myers says.

One possible way is that the early Universe was home to supermassive stars 100,000 times heavier than the Sun. After they formed, they would collapse into a black hole big enough to become supermassive within a few hundred million years.

ULAS J1120+0641 is so far away that its light has taken 12.9 billion years to reach us

Our view of quasars has certainly changed since Schmidt found the first one. "It's one of the greatest discoveries of 20th-century astronomy," says Daniel Mortlock, an astronomer at Imperial College London in the UK and co-discoverer of ULAS J1120+0641 in 2011.

Within a decade of Schmidt's finding, astronomers would spot hundreds more. That number has now reached hundreds of thousands. Today's surveys have potentially spotted a million, and over the next couple of decades, astronomers may find tens of millions.

Discovering a quasar has become routine. "It's like discovering a grain of sand on the beach," Mortlock says. "The Universe is full of them."