"There are potentially two types of water on the moon: that brought from outside sources, such as water-bearing comets striking the surface, or that that originates on the moon."
The first, it's believed, is how Earth got all its water. The second I'd never heard of.
"This second, endogenic, source is thought to possibly come from the interaction of the solar wind with moon rocks and soils.
The rocks and regolith that make up the lunar surface are about 45 percent oxygen (combined with other elements as mostly silicate minerals). The solar wind — the constant stream of charged particles emitted by the sun — are mostly protons, or positively charged hydrogen atoms.
If the charged hydrogens, which are traveling at one-third the speed of light, hit the lunar surface with enough force, they break apart oxygen bonds in soil materials, Taylor, the M3 team member suspects. Where free oxygen and hydrogen exist, there is a high chance that trace amounts of water will form."
So a sole proton can be thought of as a "positively charged hydrogen atom." Did not know that, but it makes sense. Hydrogen atoms, the smallest atoms in the element world, are made up of just one proton and one electron. That's it. No neutron.* So a sole proton can by thought of as a hydrogen atom that has lost its electron - it's negatively charged particle - and can therefore be thought of as a positively charged hydrogen atom. Huh. My atomic science lesson for the day.
So. We've got hydrogen atoms slamming into the lunar surface, which is 45% oxygen. That oxygen is bonded to other things in the rock and regolith, but the hydrogen atoms smash those bonds, and you have free oxygen. More hydrogen atoms are constantly arriving in the solar wind, and they meet up with free oxygen - H meets O - and you're bound to get H2O.
* Don't you hate exceptions to the rule? There are actually three types - isotopes - of hydrogen. The most abundant - 99.98% of all hydrogen - has no neutrons. The other two types have one and two respectively. More here.