Inside stars like the sun, the extreme temperature rips atoms into their components: protons, neutrons and electrons.
Under normal conditions, the mutual repulsion of individual protons ought to force them apart. Quantum-tunneling effects in the sun allow hot, high-speed protons to fuse into helium nuclei. This fusion reaction drives the sun’s radiance.
In the proton-proton fusion reaction, first two protons fuse. Usually the pair breaks apart again immediately, but once in a while one of the protons is transmuted into a neutron. The resulting proton-neutron pair is deuterium, a type of hydrogen. Also, a positron and a neutrino are emitted. When the positron encounters its antiparticle (an electron), the pair annihilates to form a gamma ray.
Then, another proton collides with the deuterium nucleus, forming a helium-3 nucleus (two protons and a neutron) plus a gamma ray. Gamma rays eventually work their way up from the core of the sun and out into space in the form of sunlight.
The helium-3 nucleus collides with another one, creating a helium-4 nucleus, plus two extra protons