probably learn from someone/from a book...
i mean, not to say experience wouldn't be a factor, experience might determine success rate of learning (25xp might have a 4% chance of learning a spell (failure means you lose the money or use up the book) while 600xp might have a 94% chance of learning that same spell)
also, not to say quests wouldn't be a factor, i mean, i'm sure some people or books wouldn't be available till after you complete a quest