Gyroscopes are fascinating and electronic gyroscopes are even more fascinating. What you see above is a slice of the iPhone 4’s MEMs gyroscope, a little chip able to sense X,Y, and Z displacement on the fly.
The chip is the L3G4200D from STMicroelctronics and works this way:
When a user rotates the phone, the proof mass gets displaced in the X, Y, and Z directions by Coriolis forces. An ASIC processor senses the proof mass’ displacement through capacitor plates located underneath the proof mass, as well as finger capacitors at the edges of the package.
In other words, the little thinger in the middle there basically brushes up against the other thingers in there. iFixIt has even more info but it’s all very complex and I’m no rocket surgeon, so there you have it.