http://projectpokemon.org/forums/showthread.php?4595-Action-Replay-Codes-For-Pokemon-Heart-Gold-and-Soul-Silver/page46 on there somewhere, took me literally 5 seconds to find it.
you understand this comprimises the legitimacy AND legality of your caught pokes, btw? The IV code "forces" the IVs into something they aren't suposed to be, messing up the IV > PID algorythm. For your second question, just change the hex values pertaining to the IVs to whatever you need the IVs to be for the desired hidden power.
"I have a Girlfriend who is 13 years younger than me - Back of the net!"- Alan Partridge
What does each of these values mean for each stat? Like, which one is HP, Speed, etc.?
You could always test that out yourself.
Set up your code to encounter level 100 wild Pokemon, and edit those code lines so that they each would yield a different IV number. Then run an IV check using any of the IV calculators to see which line of code effects which stat.