Power windows is a feature which is very much needed these days. But there is a slight danger in this feature and you may hurt your finger while closing the windows. This will be very painful and sometimes it is more serious especially when there are kids on board. In order to avoid this, manufacturers come up with anti-pinch function.
Working
This function makes the window to roll down when it encounters an obstacle (finger) while you try to close the windows.
How it is done?
Implementation of such a system is very simple. We introduce current sensors to measure the current drawn by the motors that powers the worm gear.

We have already seen that current drawn by an electric motor is directly proportional to its torque. Therefore, when someone places his/her finger while the window is rolling up, there is an increase in the load and hence the motor draws more current.
So, when the increase in current is more than a specified threshold, the current sensor sends a signal to the control unit which reverses the current direction within fraction of a second thereby making the windows to roll down. Finger is saved.