You don't actually "get" the Mage class, it's available from the very start. Any race that's able to play a Mage can simply select it when you first create your character. There's no quest or unlock required, just pick an eligible race and choose Mage.