The sun does not "burn" hydrogen like hydrogen burns on Earth - that is a chemical reaction between Hydrogen and oxygen, there's precious little oxygen on the Sun.
The Sun shines due to a fusion reaction from hydrogen nuclii joining together to make helium.
In a sense the sun is constantly blowing up but is being constantly held together by it's massive gravity.
We know the mass of the sun because of it's gravity and we can tell the relative abundance of all the elements in the sun by looking at the spectrum that you get from splitting it's light.