Every day, for billions of years, the Sun has risen over Earth's horizon. It may be 150 million kilometres away, but our star shines so brilliantly in the sky that we cannot look at it with our own eyes, lest we damage them. At the surface, the Sun is 5,500C – hot enough to melt any landing probe into oblivion before it even got close.

In other words, the Sun is literally too hot to handle. But that does not mean we cannot study it.

In fact, there are several ingenious techniques through which we have begun to unravel the secrets of the stars dotted throughout the night sky, as well as the one in our own backyard. How, then, is this possible?

We begin with light itself. We might not be able to look at the Sun in safety, but scientific instruments can.

As you may know, "white" light is actually made up of all the colours of the rainbow, and we can see those colours – from deep red right through to violet – if we "split" the light with a prism.

This only tells you what the composition is at the surface

Way back in 1802 an English scientist named William Hyde Wollaston did this with the Sun's light and noticed something unexpected: dark lines in the spectrum. A few years later, the German optician Joseph von Fraunhofer built a special instrument called a spectrometer to disperse the light better. He saw even more of these curious dark lines.

Scientists soon realised that the dark lines showed where colours were missing from the spectrum. They were missing because elements in and around the Sun were absorbing those specific wavelengths of light. The dark lines therefore indicated the presence of certain elements such as hydrogen, sodium and calcium.

It is a remarkably clever, beautiful and simple discovery and it more or less instantly taught us about some key elements found in our nearest star. However, as Philipp Podsiadlowski, a physicist at the University of Oxford, points out, this approach has its limitations. "This only tells you what the composition is at the surface, it doesn't tell you anything about the composition at the centre of the Sun," he says.

So what is inside the Sun, and do the contents help explain how it got its colossal energy?

Our understanding of the Sun's massive energy output began to crystallise early in the 20th Century, when it was theorised that if hydrogen atoms could fuse together they would create an entirely different element – helium – and release energy in the process. It seemed likely, then, that the Sun was rich in hydrogen and helium, and owed its mighty power to the formation of the latter from the former. But the idea still had to be proved.

If it were not for special detectors, we would never know they were there

"People in the 1930s realised that the Sun was probably powered by the fusion of hydrogen, but that of course [was] still theory," explains Podsiadlowski.

This is where studying the Sun gets really strange. In order to better understand the star that gave life to our world, we have to go underground. In fact, we have to bury our experiments underneath mountains. That is how the Japanese Super-Kamiokande (Super-K) detector was designed, anyway.

Some 1,000m below the surface lies an odd-looking, dingy room. It contains a shallow lake of extremely pure water, and 13,000 spherical objects cover the walls, ceiling and underwater floor.

It looks like something from science fiction, but Super-K is devoted to better understanding the reality of how our Sun works.

Being so far underground, it is obvious that Super-K is not built to detect light. Instead, it is waiting for very special particles that originate in the centre of our star and which fly through matter like a plane flies through the air.

There are many trillions of them passing through you every second. If it were not for special detectors, we would never know they were there. But the Super-K can pick up a few, roughly 40 a day, thanks to the detection of special light that is created when these particles – called neutrinos – interact, as they occasionally do, with its pool of pure water.

The light that is created is incredibly faint, but it generates a sort of halo around the neutrino and that halo can be picked up by the phenomenally sensitive light detectors covering the detector's walls.

These neutrinos are formed in fusion reactions right inside the centre of the Sun

Special types of neutrinos which are identified through this method are considered direct evidence that the nuclear fusion of hydrogen into helium is happening inside the Sun. We know of no other way to explain the neutrinos' formation.

"You can only capture a tiny fraction of the neutrinos but you can then calculate how many neutrinos there must be given the numbers that are actually observed," says Podsiadlowski.

What is even more astounding is that these neutrinos are formed in fusion reactions right inside the centre of the Sun, and they get picked up by the Super-K detector just eight minutes later. Studying them allows us to observe what is going on deep inside the Sun in more or less real time.

If that wasn't enough, we can even image the Sun using this method. It is actually possible to create pictures of the Sun's interior solely from measurements made underground, where sunlight cannot reach.

The Sun has two advantages that tip the scale in the favour of fusion

In order to better understand the details of those fusion reactions, though, it is also necessary to try to recreate them here on Earth. In principle this is not difficult: a 13-year-old British schoolboy successfully initiated a fusion reaction in 2014. But if you want to keep observing those reactions without interference from particles whizzing in from the Sun itself, you have to go underground again.

This is precisely what Marialuisa Aliotta, a nuclear physicist at the University of Edinburgh, does.

One of the difficult things about fusion reactions, explains Aliotta, is actually getting any two atoms to "agree" to fuse. The probability of this happening, despite having trillions of atoms floating around, is incredibly low.

The Sun has two advantages that tip the scale in the favour of fusion, though. It is massive so it has a surplus of atoms, and it also has a lot of gravity, which compresses the hydrogen into plasma: hydrogen gas at such a great pressure that electrons are separated from protons in the nucleus. This environment makes it easier for fusion reactions to happen.

"In a star like our Sun, the probability that a significant amount of energy can be liberated through nuclear reactions is very high simply because there are lots of protons," explains Aliotta. "In the lab we don't have this many protons and so it becomes very, very difficult to study these processes."

The Sun's energy output waned and then waxed again

Still, Aliotta is able to experiment with fusion at facilities like the Laboratory for Underground Nuclear Astrophysics (LUNA) in Italy. The work enables Aliotta and her colleagues to learn more about what happens when fusion takes place – what products are created and how those particles interact.

It is easy to get the impression that the Sun is a permanent fixture that will shine with a constant level of brightness forever. It will not. In fact, stars have cycles and lifespans which, depending on their size and the precise proportions of elements within them, can be quite varied.

In recent years we have been able to learn a lot more about how the Sun changes by studying some of its features. Sunspots, for example, are dark, temporary patches that appear on the surface of the Sun from time to time. Probes have been able to study precisely how much radiation, including visible light, has been emitted by the Sun over the course of several years.

In the 1980s, researchers working on the Solar Maximum Mission realised that over the course of around 10 years, the Sun's energy output waned and then waxed again. What was really striking was that the number of sunspots correlated with this activity: the more there were, the more energy was being released from the Sun. Since sunspots are darker and colder than the rest of the solar surface, this was a surprise.

"It was the inverse," says Simon Foster at Imperial College, London. "This was very peculiar, you've got more dark features, more cold features yet the Sun's in effect hotter."

Radio telescopes are very good at catching the really interesting bits of a star's life

Foster says that scientists eventually discovered the cause. There are special bright areas on the Sun's surface – called faculae – which coincide with sunspots but are distinct from them so that both are visible. It is these faculae that release the extra energy.

As well as sunspots, it is also possible to detect solar flares – massive flashes of matter that burst out from the Sun's surface following a build-up in magnetic energy. Because stars emit radiation across the electromagnetic spectrum, these flares can be seen with X-ray detectors. But there are other ways to detect them. One tactic is to listen to radio waves – another form of electromagnetic radiation.

The huge radio telescope at Jodrell Bank in England, the first of its kind in the world, is able to detect solar flares, says Tim O'Brien at the University of Manchester, who works at the telescope.

In fact, radio telescopes are very good at catching the really interesting bits of a star's life. When a star is behaving "normally", without much activity, it does not emit many radio waves. But when stars are born, or when they die, great radio wave emissions are produced.

"What we see are the active events. We see the explosions of stars, we see shockwaves, we see stellar winds," says O'Brien.

Some stars are destined to become pulsars

Radio telescopes were also used by Northern Irish scientist Jocelyn Bell Burnell to discover pulsars – a special type of neutron star.

Neutron stars form after gigantic supernova explosions in which a star collapses back in on itself to become incredibly dense. Pulsars are cases of such neutron stars which happen to emit a beam of electromagnetic radiation at their poles and it is this that can be detected by radio telescopes.

It is such a regular signal, emitting as frequently as every few milliseconds, that some researchers initially wondered if they were some form of communication by intelligent species elsewhere in the Universe.

Thanks to the discovery of many more pulsars, it is now accepted that this regular pulse is caused by the spinning of the star itself.

"It spins about its vertical axis and this beam is sticking out diagonally – that then sweeps about the sky," explains O'Brien. "If you happen to be looking at it along the line of sight, you see the regular flash as the beam sweeps past. Just like a lighthouse."

This "white dwarf" will slowly cool down over a trillion years

Some stars are destined to become pulsars. But our Sun is almost certainly not in their ranks: it is too small to explode in a supernova reaction at the end of its life. What, then, is its likely fate in billions of years' time?

We know from observing other stars around us in the galaxy that there is a range of end-of-life possibilities. But given what we know about the mass of our Sun and having compared it to similar stars out there, its future seems reasonably clear.

We expect that it will gradually expand towards the end of its life – in another 5 billion years or so – to become a red giant. The radiation it emits will be weaker than before as the hydrogen fuel which powers it gets used up. This "weaker" light will have a lower frequency, since it has less energy, and the Sun will therefore literally become redder.

Then, following a series of explosions, all that will remain will be the Sun's inner core of carbon – essentially a diamond as large as Earth. This "white dwarf" will slowly cool down over a trillion years.

There are still many mysteries about the Sun, and there are some exciting projects on the way which will help to unravel them.

We have been able to answer many important questions about the nature of our Sun

One example is the Solar Probe Plus, which will come closer to the Sun than any other probe in history, in order to try and find out more about how solar winds are produced and discover why the Sun's corona – an aura of plasma around the star – is hotter than its actual surface.

But we know many of the fundamentals. By splitting the Sun's light into a glorious array of colours, and catching neutrinos in deep, dark laboratories underground, we have been able to answer many important questions about the nature of our Sun.

We also now know a lot about what stars are made of, how they create light, and how that process ultimately produces the huge array of elements so vital to us here on Earth.

The 19th-century lullaby, "Twinkle, twinkle, little star" exclaims "how I wonder what you are". It is comforting to know that, 200 years later, we at last have a pretty good idea.