It has to do with afterimages and which cells in your visual cortex you're stimulating. If you stimulate the cells with a motion moving one way, the cells that are responsive to that direction get tired, so the afterimage looks like something moving in the opposite direction. That's a VERY basic explanation.