To get a Fennekin with Magician, you must catch a Braixen with the ability from the Fire type Friend Safari and breed it. The baby Fennekin has a 70% chance of having Magician.
Of course, if your intent is to evolve Fennekin into Delphox, it doesn't matter if you use the Braixen you caught or a baby Fennekin you bred.
To get a Magician Klefki, you must encounter a horde of Klefki (which appear on Route 15 and the Lost Hotel, but they are rare). The Klefkis in the horde battle have a chance of having the Magicin ability.