There is a small rubber lip that surrounds the mirror glass and all you should have to do is use a screw driver (be careful not to crack the glass, might be easier if you cover the end of the screw driver with something) or similar tool to push the rubber behind the mirror a little at a time. Use the reverse process to get it back in. It is tedious to get the new glass in, takes me forever to do it.
Edit: Truthfully, if you need to replace it because it's scratched or something like that, you might actually save some time if you just break it and pull out the pieces LOL. As I said before, it's kind of a pain.