When a magnetic field is brought near a conducting plate, the positive and negative charge deviate from their usual current path in directions opposite to each other. This produces a measurable voltage across the conductor. This is called the hall effect.
A hall effect sensor can therefore detect the strength and polarity of nearby magnetic fields. These are used in Rotary encoder > Magnetic encoder