Magic
You gain the following if your character possesses the Magic role. (The role is determined by your character’s Class.)
1st - Spellcasting, Exposure, Spell Selection, Cantrip Selection (Paladins do not gain cantrips)
2nd - Channel
3rd - Spell Selection, Magic Mutation
4th - Magic Feat
5th - Spell Selection, Cantrip Mastery
Magic Role Progression
You gain the following if your character possesses Magic Role Progression from their Prestige Class.
6th - Spellcasting Progression
7th - Spell Selection
8th - Advanced Magic Feat
9th - Improved Channel
10th - The Mana Within
Each of the Magic classes are part of a wellspring of magic, within each of the wellspring of magic they have the ability to learn spells form the other classes without a lot of issues. To learn spells outside of these classes possibly requires time, access to archives, time, money and good skill checks among some other things that might be relevant to the spell being attempted to learn.