In A Link to the Past, the wizard who serves Ganon is Agahnim.
Agahnim is a powerful wizard who seizes control of Hyrule after the king is murdered. He presents himself as a trusted royal adviser while secretly working to release Ganon from the Dark World. As part of his plan, he captures Princess Zelda and sends her and other descendants of the Seven Sages into the Dark World.
Agahnim is not simply an independent servant. The story reveals that he is possessed by, or functions as an agent of, a fragment of Ganon’s spirit. This connection explains his extraordinary magic and why defeating the wizard does not end the threat. After Link defeats Agahnim in Hyrule Castle and later confronts him again in the Dark World, Ganon emerges and retreats to the Pyramid of Power.
Players sometimes confuse Agahnim with Vaati, another Zelda-series sorcerer, or with Ganon himself. Agahnim is the human-looking wizard and intermediary; Ganon is the demon king he serves. The game’s 1991 SNES story uses Agahnim to build toward the final confrontation with Ganon.