Mass and energy are equivalent. You're using X energy to reduce the mass of your fuel and converting that mass into Y energy. When X < Y you have useful energy production at the cost of the mass of your fuel. Energy is conserved.
The reason nuclear fusion is such a desirable goal is because it only takes a relatively small amount of mass to convert into a relatively large amount of useful energy, and the mass (the fuel) is relatively easy to obtain.
Like all energy generation, it's converting one type of energy into another, more convenient type, to do useful work. Like a hydroelectric dam converting the potential energy of water into more useful electrical energy. Energy is conserved when water spins a turbine, it's just that electrical energy is more useful for work than the potential energy of the water. Of course you can still use the potential (or kinetic) energy of the water directly, such as with a water mill. But the energy to work ratio is worse in that form (especially if the work to be done is far away from the watermill).
Whenever you build a fire you need to input some amount of energy to begin the chemical reaction that releases energy. In this instance we get not electrical energy, but energy in the form of infrared and visible light, to heat our home and light our way. Yet the total energy released by the fire far surpasses the energy you used to start the reaction, but because the wood's mass is consumed, energy is ultimately conserved. You have converted wood (not useful for heating your home) into infrared light (useful for heating your home).
Mass is energy at rest, hence equivalence with exception of massless particles like photons that have zero mass and non-zero energy. Also, photons travel with the speed of light in vacuum and cannot be found at rest in any frame of reference. Modern physics is fun, isn't it?
P.S. Neutrinos were thought to have zero mass as well, but according to the Standard model they have mass.
The reason nuclear fusion is such a desirable goal is because it only takes a relatively small amount of mass to convert into a relatively large amount of useful energy, and the mass (the fuel) is relatively easy to obtain.
Like all energy generation, it's converting one type of energy into another, more convenient type, to do useful work. Like a hydroelectric dam converting the potential energy of water into more useful electrical energy. Energy is conserved when water spins a turbine, it's just that electrical energy is more useful for work than the potential energy of the water. Of course you can still use the potential (or kinetic) energy of the water directly, such as with a water mill. But the energy to work ratio is worse in that form (especially if the work to be done is far away from the watermill).
Whenever you build a fire you need to input some amount of energy to begin the chemical reaction that releases energy. In this instance we get not electrical energy, but energy in the form of infrared and visible light, to heat our home and light our way. Yet the total energy released by the fire far surpasses the energy you used to start the reaction, but because the wood's mass is consumed, energy is ultimately conserved. You have converted wood (not useful for heating your home) into infrared light (useful for heating your home).