When you say it varies by setting, do you mean that in the same way a person might claim that the ability to learn magic varies by setting?
Or is the ability for anyone who wants to being able to learn how to cast spells much more firmly entrenched or even completely unquestioned?
Any Commoner has the potential to become a level 1 whatever. the Sorcerer and Warlock classes are the only ones I'm aware of that mechanically tie into a bloodline inherited ability.

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.