Several kinds of technology have been used for touch screens.
If the screen responds without actually being touched, it probably uses a system that has tiny infrared light emitters and detectors along the edge of the screen. When a finger interrupts the grid of beams, a computer can tell its exact position.
Some screens sensitive to actual touch use low-voltage electrical fields; a touch completes a circuit, giving a readable location.