A pickup is an electronic device which is mostly used with electric guitars but not limited to them and are also used for picking up acoustic and classical guitars, violins and other instruments.

There are several types of pickups:
Magnetic pickups work with metal strings and catch string's movements using a magnetic field created my a magnetic coil. These are most common with electric guitars.
Piezo-electric pickups use somewhat different approach and are more often used with acoustic instrumets.
Optical pickups are a new wave of pickups developed by one company and are currently not widely used. Yet they promise to be better than other types of pickup because of their clear sound and accurate representation of string vibrations.