The wording used in pre-3e is that priests/clerics, druids, rangers, paladins and druids "acquire their spells through prayer". That means they pray during rests and can then generally access spells according to their deity's major or minor spheres of influence. The cleric would then either get the wish list, or find deviations, maybe because without the players' knowledge they're about to face an obstacle where a certain obscure spell would be handy, or because the cleric misbehaved and gets a first warning through a selection of useless spells. Clerics also use spell components, like words, gestures and consumables, to cast their spells. Clerics, druids, rangers, paladins and druids without obvious deities, usually receive their spells through proxies, powerful fiends or other mighty outer planar creatures with access to spell spheres, although sometimes without even the casters' knowledge. An exception would be shamans (5e: Warlocks) who in a way don't use their own magical power, but use the magical energies of spiritual entities. But, even they would do the chanting and praying mostly off-play and, unless they perform a ritual to work major mojo usually beyond their level, use spellcasting to manifest the power.