How does water injection provide more horse power? Is water actually being injected into the cylinders because to me that would hinder the combustion process.
Water is injected, usually before the supercharger. It does two things
1 cools the charge which increases its density and thereby allows more air/fuel mixture to be drawn in. This works even without a supercharger.
2 lowers the temperature which prevents preignition and knocking and thereby allows a increased boost pressure that allows more air/fuel mixture to be forced in.
There may be combustion chemistry effects as well and the the water itself adds mass that expands. An alcohol is usually added to prevent freezing because intake manifold is at negative pressure and thus colder.
Normal combustion is at a stoichiometric ratio of 14.2 parts air to 1 part gasoline by mass. By making the mixture "rich" with fuel a substantial charge cooling effect is created by some aromatic fuels that has a similar effect to water injection, it also changes the combustion balance effectively increasing Octane Number. To take advantage of this the fuel needs to be injected where it reduces the work of the supercharger ie ahead of it.
The allies I think referred to it as ADI anti detonation injection. There is a story of some P-47 destroying their engine when ADI was turned on. Whereas the Germans switched from MW30 to MW50 in winter the P-47 were supplied with something equal to 30% ethanol which didn't work in high altitude Europe. May also have been the USAAF using isopropyl or butyl alcohol which probably wasn't authorized by Pratt and Whitney. For a while anyway P-47 pilots were reluctant to test fate and turn on their water injection.
When German Green dyed C grade fuel went from about 93/115 to 96/130 about late 42 or early 1943 the direct fuel injected engines like the BMW 801 received a method of injecting fuel into the supercharger "rich mixture injection" inlet to take full advantage of this.
Initially only ground attack Fw 190F received this, the fighter versions the Fw 190A series received increased boost only. I think 1.57ata in part because they operated at higher altitude where the supercharger was unable to overboost.
Eventually the two systems were combined.
The BMW801 didn't receive water injection, the so called Ribbentrop system till late war. There are some stories of water injection splitting or corroding cylinder heads. That may be false rumors from experimental direct cylinder injection which yield such results. I think at some point BMW began casting their cylinder heads in a vacuum, which may have increased their strength. Rich mixture injection achieved the same with less hassle.
I think the V-1650 of the P-51H combined rich mixture with ADI water injection.
Water injection also works with jet engines. Probably why some 1970s jets had Smokey exhausts.