Basically there are two types of touchpads (same technology is used for touchscreens too).
There are resistive touchpads and capacitive touchpads.
I'll start with the resistive touchpads first, because they're easier to explain. On a resistive touchpad, you have a series of parallel wires and on top of that another series of parallel wires which are perpendicular to the bottom layer. They form the matrix from which the input is received.
Here's a picrure of how that works on a touchscreen, but on touchpads, the result is same:
When the touchpad is pressed, two films contact each-other and based on the location of their contact, coordinates can be calculated. Also if pressure calculation is needed, resistance of the wires is measured and in that way, exact pressure can be determined. With higher pressure, contact between the plates is better and resistance is lower.
This type of touch sensors will work with any pressure source sufficient to bent the film and make contact between the plates. As far as I know, this type of technology is no longer in use for laptop touchpads.
The second type of touchpads (and touchscreens) is capacitive.
There are two popular types of this type of touchpad.
First uses a matrix of wires which looks same as the one in resistive touchpads, but is not flexible. To explain how it works, we need a bit of theory on electric field.
Here we have electric field between two charged plates:
Situation is similar with the case where we have wires. When a piece of material which will have considerable impact on the electric field is brought in the field of the capacitor formed at the location where the two layers intersect, it will affect the capacitance of the capacitor. This change can be detected an measured. The closer the finger is to the node, bigger effect will be and so you can get pressure measurements too.
The second type of sensor is used on both touchpads, touchscreens and as "flat" buttons now commonly seen on various devices.
It has instead of two layers of parallel wires a grid of small pads where one is transmitter and the other is receiver. They form capacitors and when finger or other material which affects electric field is brought near, the capacitance will change. This change can be detected and measured and this way location of the finger (o other material which affects the electric field) can be detected.
The capacitive sensors are supposed to have higher reliability than resistive sensors (no moving parts), have higher precision and not be affected by various objects other than a finger which may be placed on them.