"But wait a minute," you say. "We've tried this nuclear fusion stuff on Earth to produce energy and so far it hasn't worked very well. How does the sun succeed where we have failed?"
You are right. Operational nuclear power plants on Earth use fission reactions to produce power. They work by splitting apart heavy nuclei like Uranium-235 or Plutonium-239. The combined mass of the resulting lighter nuclei is less than the original heavy nucleus. The missing mass is converted to energy, mostly in the form of heat.
Uranium-235 and Plutonium-239 are very rare elements that are difficult to extract. The Earth's reserves will be used up in a relatively short time. In addition, the products left over from the fission reaction are radioactive and thus dangerous to humans. This radioactive waste has to be disposed of very carefully.
We have high hopes that nuclear power plants using fusion reactions to liberate energy will soon be developed.