Realm magic requirements
There are two groups of characters that can utilize realm magic – regents and non-regents.
Regents have it simple; they automatically gain the ability to cast realm spells (they gain the Cast Realm Spell feat as a virtual feat), even if they lack the prerequisite skills and feats. Note that this rule only applies to regents that could potentially learn realm magic AND rule domains that include holdings of the relevant type (temple or source).
Example: A wizard ruling a source type domain would benefit from this rule, but a fighter ruling a law domain (or even a temple domain) would not – obviously!
For non-regents it is more complex. They have to learn it the hard way, sending feats and skill points to master this, the most difficult of magics.
Example: The High Priestess of the ETN wants her paladin/cleric lieutenant to learn how to cast realm magic since she thinks that would be an important asset to her domain. After he has mastered realm magic, the ETN can, for example, prepare realm spell with the bonus lieutenant action.
Note that many (but not all) domain rulers will already have learned realm magic before becoming regents; many will have been the lieutenants of the previous ruler. Such characters retain their existing abilities, and if they should cease being regent they could conceivably still continue to utilize realm magic (as a lieutenant for example).
Optional Rule (Not used in RoE PbeM): If the DM allows characters to be redesigned, you might want to use that option when your character becomes regent to benefit from the virtual Cast Realm Spell feat. If such a character loses his domain, he would have to re-learn how to cast realm spells.