I was curious how the 3D Touch feature worked on the iPhone 6S. Here’s a reasonable explanation based on a iFixit teardown. tl;dr: low resolution capacitive sensors measure the distance between your finger and the base of the phone. The glass bends a bit.
I can’t say I find the UI gesture very useful. The lack of true tactile feedback makes it hard to know which gesture you’re making, and the lack of much in the UI using the sensor means often nothing happens. We need someone to figure out a great use for it, and that in turn probably requires more market saturation.