Why do touchscreens know where my finger is?

Screens sense touch with electrical grids or light sensors that detect where your finger blocks or presses.