Nuclear fusion is the process by which two light atomic nuclei combine to form a single heavier one while releasing massive amounts of energy.
Fusion reactions take place in a state of matter called plasma — a hot, charged gas made of positive ions and free-moving electrons with unique properties distinct from solids, liquids or gases.
The sun, along with all other stars, is powered by this reaction. To fuse in our sun, nuclei need to collide with each other at extremely high temperatures, around ten million degrees Celsius. The high temperature provides them with enough energy to overcome their mutual electrical repulsion. Once the nuclei come within a very close range of each other, the attractive nuclear force between them will outweigh the electrical repulsion and allow them to fuse. For this to happen, the nuclei must be confined within a small space to increase the chances of collision. In the sun, the extreme pressure produced by its immense gravity creates the conditions for fusion.