Magic Mirror is the same mirror seen in Snow White and the Seven Dwarfs. As a mirror, he has no identifiable gender, but his masculine voice leads viewers to see him as male. Mirror has a fairly minor role, but appears in most of the Shrek films to date. He is voiced by Chris Miller.
Shrek
In the first movie, the Magic Mirror is retrieved by Lord Farquaad's guards. He informs Farquaad that without a queen, he cannot be a king, and proceeds to introduce three princesses in Bachelorette style (Snow White, Cinderella and Fiona). Magic Mirror is not seen for the rest of the film, except for one brief scene where he reluctantly replays Fiona's picture for Farquaad. He is however seen again during the film's ending dance scene, alongside some breakdancing dwarfs.
Shrek 2
Again, Magic Mirror has only a small role in the second film. In Shrek 2, the Mirror is used less like a magical item, and more like a TV, as he relays the capture of Shrek, Puss and Donkey much like a cop show. However, without the Mirror, the other fairy tale creatures wouldn't have rescued the heroes.
Shrek Forever After
Magic Mirror is seen only very briefly, where Rumpelstiltskin uses him like a TV/Radio to broadcast messages to his kingdom.