Although any class in Path of Exile can eventually reach any passive skill on the passive skill tree, each class has their own distinct set of Ascendancy classes. A Witch can, for example, eventually become an Elementalist, but a Templar cannot. You can unlock your Ascendancy class by completing the Labyrinth and using the Altar of Ascendancy in the final room. Higher-tier Labyrinths then grant two more Ascendancy points when you reach the Altar of Ascendancy, for a total of 8 points.
Once you've chosen your Ascendancy, you can change it by returning to the Labyrinth, refunding any allocated Ascendancy points (Refunding an Ascendancy point costs five refund points each), and selecting a new class at the Altar of Ascendancy.