Do a google search on HPLRP (Health Professionals Loan Repayment Program) or do a search on SDN on the same term in the military medicine forum.
In the Army National Guard or Army Reserve, it is the same program. You get $40K of federal student loans for medical school reimbursed one year after signing up for the program. You can do this for six years max. You do not incur service obligations for this. When you sign the form for the program, one year later you are eligible for the reimbursement. If you resign at any point during the year, you do not get the reimbursement (nor do they pro-rate it).
This program is open only to board eligible folks. You can take it during residency only during your PGY-3 year and later ONLY if you are taking STRAP.
STRAP is a completely separate program. You get a stipend of about $2200/month during residency and you owe the Army Reserve/National Guard 2 years of drilling status post-residency for every year you take the stipend while in residency. When you are paying back your obligation for STRAP post-residency (say, for 8 years if you took STRAP for a four year residency), you can NOT take HPLRP.
Aside from the google search, I'd recommend reading the stickies on this forum. You would be in the Reserve Corps for these programs and are very much in the Army. It is much less commitment than serving full-time, but it is still a commitment that occupies a fair bit of time and dictates small parts of your life at all times (haircut, height/weight, fitness, drug-free, etc.). And when you deploy, you will be under the sames rules and policies as full-time Army.
HPLRP and STRAP are great incentives for folks who want to serve in the military. Neither is so compelling as to join just for the sake of them. I have been in the National Guard throughout residency and have been happy with my decision, but do not be under any illusions about the financial worth of it: you can make more money moonlighting during residency than you will receive from STRAP and in fewer hours. You can make more money moonlighting post-residency than you will receive from HPRLP and in fewer hours.