How do mousepads work?
How do laptop mousepads and iPod scroll wheels work?
The pads are electrically sensitive to capacitance, or how much charge you can store in a certain area of the pad. When you put your finger on you need to have good electrical contact between your finger and the pad. Then it works out effectively how much charge is stored on that spot. It's got a matrix or array of wires running in one direction, and then the other direction. So it can literally use the x and y to work out where your finger must be. As you move your finger it's sensing how the stored charge moves across the pad. It resolves that into a direction and translates it into movement of the pointer on the screen.