The intense heat at the core of a star prevents an electron from remaining bound to any one atomic nucleus to form atoms as we know them. Instead, the negatively charged electrons and positively charged nuclei move randomly about independent of one another. This kind of gas is known as a plasma. There are equal amounts of positive and negative charge, so the plasma itself has no net charge. The majority of nuclei in the Sun are protons, more familiar to us as nuclei of hydrogen atoms. Next most common is the helium nucleus composed of two protons and two neutrons, bound together by a force far stronger than any electric field: the nuclear binding force. While electric fields are not strong enough to keep atoms together at the high temperature in the core, the nuclear binding force is easily strong enough to keep every helium nucleus bound tightly together.
As the positively charged nuclei of a plasma move randomly around, pairs will often approach close together, but electric repulsion keeps them from actually touching. At higher temperatures the nuclei move faster and will approach each other more closely. The temperature at the core of the Sun is high enough that pairs of protons can occasionally approach close enough for the nuclear binding force to attract them together, overwhelming their electric repulsion. After this occurs once, a few more encounters will result in four protons combining into a single helium nucleus. (During this process, different nuclear effects convert two of the protons into neutrons and several more exotic sub-atomic particles, as shown in the figure). This is known as nuclear fusion, and it releases a net energy due to the tight binding of its constituents. The continuous fusion of protons into helium nuclei
releases the energy that powers the Sun.