Sliding mask

Ok. I know you can’t actually move a mask and I have found tutorials where you can fake a moving mask, but I saw a website once where when you moved the mouse over you could see the part of the picture the mouse was over, but not the rest of the picture. anyone know how to do that?