"Exemplar" works simply by having the hero in the same province where you are doing the recruiting. Note that any units already on the production stack prior to the hero moving there / gaining the ability does NOT get to benefit from the skill. In most cases you can cancel the recruiting and add the unit back, at which point the bonus will apply, though units that were bought at a discount and/or takes multiple turns to build will have to be restarted. It's up to you if that's worth it.
I can confirm that the hero does NOT need to be part of the Lord doing the recruiting's army, nor does he (as you correctly assumed) need to be deployed.
I cannot confirm if it works on all unit types, but I tried with a few and they all seemed to benefit from the additional experience (ranks and experience seem to be used interchangeably where units are concerned, though they mean different things for heroes and lords). Heroes and Lords are not counted as recruits for the purposes of this skill.
I have no other source than in-game testing at this point, as I couldn't find anything in the game's documentation or manual about the precise rules governing the skill.
I also did not have the correct configuration of heroes to easily test whether multiple instances of the skill stacks or the highest one present takes precedence, but I would assume the latter.