Phase_9 said:
But first, you need to either find NPC's that have that class to teach it to you, have one of your allies who already has a specialization teach you (Wynne is Spirit Healer, Morrigan is a Shapeshifter), or find a shopkeeper with a manual that teaches you the specialization (they are usually expensive)
After you unlock the specilization once by any means, it remains available for future playthroughs as well.
If I'm not mistaken, there is are a few options for unlocking most specilizations. However, in terms of effort/in game cost requirements, the easiest way to get them are:
Bard - Taugt by Leliana if approval is high enough
Assassin - Taught by Zeverin if approval is high enough
Shapeshifter - taught by Morrigan
Templar - Taught by Alistair
Beserker - Taught by oghrim
Duelist - learned from Isabella, in the Pearl are of Denerim
Arcane Warrior - learned from a spirit trapped in a philactry in the Dalish Elves quest
Blood Mage - Learned from Desire demon in the fade during Redcliff quest line (only if PC is a mage though).
Ranger - learned from a book sold by camp vendor
Spirit Healer - Learned from Wynn
Champion - Learned from Arl Eamon upon completing Redcliff questline