You don't change leader - the leader you selected stays the whole game. Instead, you'll get a new base Civilization when the era changes, with legacy benefits from your achievements in the previous era.
So for example, you pick Egypt for the Antiquity era. It's fully designed with the antiquity era in mind and all it's unique buildings, units, etc, are for that era. At the end of the Antiquity era, you'll hit a crisis event, when the crisis is over, there's some sort of nominal time gap, and you'll pick a new civilization that emerges from the changes that hit Egypt following the crisis and the cut-to-black. Say you pick Songhai for the Age of Exploration because it's also a river civilization and you spent all your time doing river stuff. Songhai is an Age of Exploration Civilization, so all it's stuff is designed for that age - it'll still have focuses like combat, or trade, or having really nice mountain resorts where people can find themselves, but it's unique buildings/units/etc are all designed around the Age of Exploration. At the end of the age of exploration you'll hit a crisis, there's a nominal time jump, and you'll pick a third civilization for the Modern Age, one that evolved out of the changes wrought to Songhai during the crisis and still having the legacies of it's founding culture, Ancient Egypt. Say you picked America because you want to go for the space race and America gets +10% bonus from Moon tile yields or whatever. All of America's stuff is designed around the modern age.
The third age is when you'll actually go for the game ending victory condition. Presumably there's also a crisis that means you have two competing gameplay imperatives, survive the crisis and pull off your chosen victory.