If I'm a 5th-level monk who gains the werewolf template, what exactly happens to my character? I know I gain 2 d8-sized hit dice, but do I become a 7th-level monk? Or do the hit dice and level adjustment stack to make me a 10th-level monk? Or do I not gain any monk levels at all? I'm very confused – can someone please explain to me in detail how gaining a template during play affects my level?
You advance 2d8 hit dice because the template says:
A lycanthrope adds the Hit Dice of its animal form to its base Hit Dice for race, level, and class. These additional Hit Dice modify the lycanthrope’s base attack bonus and base saving throw bonuses accordingly.
Every creature type works somewhat like a class: you now have two extra levels of animal, not monk.
The level adjustment (LA) is a measure of how much more powerful the template makes you. If I make a 5th level fighter who is an aasimar, then the LA of +1 means that I am supposedly as powerful as a 6th level character. I don't get any HD or levels from the adjustment; it just indicates the extra edge my race gives me. This is on top of any racial HD.
Neither the animal HD nor the LA improve your monk abilities. Gaining the template mid-game complicates matters. You really have to consult your DM about how to handle it -- one way would be to say that you don't level up again until your XP matches your extra power. (You have gained about 4 levels worth of power; two levels of animal and the LA +2 from the afflicted werewolf template.)