What is used on glass to make it mirrored?

I was just wondering what the stuff on the back of mirrors is. I’m talking about the chap vertical mirrors that you can buy at wal-mart for about $5 a pop. Is the reflective stuff painted on? Is there anyway I can do this myself to some plate glass o my own?