Touchscreens come in two main varieties—Capacitive and Resistive—and you've no doubt encountered them both at one point or another. Virtually all contemporary touchscreens--such as those found on smartphones and tablets--are capacitive. Resistive touchscreens are the older, less advanced less technology, but are still common in certain contexts: ATMs and other automated ticket dispensers, navigation systems, home thermostats, and common applications.
All touchscreens work by recognizing changes in their surface conditions, which, depending on the device, can include changes in light, pressure, or electrical current. Capacitive touchscreens respond primarily--and very sensitively--to electrical current in the human body. When you touch the screen of an iPhone, for example, your finger alters the electrical current of the digitizer, and the device recognizes that change, activating its software accordingly. No pressure is required, so gestures can be more precise and more complex than in resistive displays.
Resistive touchscreens, as their name suggests, respond to pressure. This is why ATM's are often frustratingly unresponsive compared to, say, iPhones; pressure must be applied directly and accurately for the touchscreen to activate. Structurally, resistive touchscreens consist of two layers; when the top layer is pressed into the display, a software response is activated. However, resistive displays may be used with gloved fingers, as well as styluses.
For more information on touchscreens, read: Touchscreens: An Overview.