where do this hydrogen and helium come from?
That's a good observation! (Don't let school or your teachers ruin that, curiosity, knowing how to ask good questions and keen observation is so important.)
Big Bang model explains the abundance of those two elements as leftovers from the origin of the universe. You can find more information here for example: http://en.wikipedia.org/wiki/Big_Bang_nu…
or here: http://www.einstein-online.info/spotligh…
In the Big Bang model, the early universe had a large amount of free electrons, protons and neutrons (the stablest particles), and very large quantities of radiation (light, also called photons). When the concentration of photons got low enough (due to expansion), there were few collisions of the other particles with environmental photons and so they had more opportunities to come together and form atoms (hydrogen, helium, and "isotopes" which are variations of those which have different numbers of neutrons).
The abundances of those chemical elements can be measured by simply looking at the sky and measuring the light spectrum -- and most emission is identified from those elements -- in galaxies as well as outside them. Most of those measurements are done in radio wavelengths -- a subject called radioastronomy.