Nuclear binding energy is the energy that has to be added to a nucleus in order to separate it into its constituent protons and neutrons. Another way of thinking about it is that it is the net energy that would be released if you pushed a bunch of protons and neutrons together so tightly than the short range strong nuclear force combined them into a nucleus.
Since the binding energy is always positive, the mass of a nucleus is smaller than the sum of the masses of its individual nucleons. So binding energy is sometimes referred to as the mass defect or mass deficit of a nucleus.
The key number is the average binding energy per nucleon. This is a minimum value for hydrogen (which has zero binding energy since its nucleus is a single proton), increases from hydrogen up to iron, and then decreases again for elements further along the periodic table than iron (this is a slight simplification - there is a chart of the actual shape of the curve here).
So if you fuse two nuclei that are lighter than iron, the mass defect of the fused nucleus is greater than the mass defect of the original nuclei. Since the mass defect goes up, the mass of the combined nucleus is smaller than the combined masses of the original nuclei, and the “missing” mass is released as energy. Similarly, if you split or fission a nucleus that is heavier than iron the mass defect also goes up, and energy is released.