Introduction to Encoders
Encoders are used to convert (encode) a mechanical position as an signal that is readable by some sort of control circuit.
They work by sensing position and can be built out of a variety of materials:
Paper or plastic with patterns or notches cut in it.
Magnetic sensors and permanent magnets.
Inductive loops modulating resonant circuits
Wire "feelers" on a conductive disks.
Etc. Only your imagination limits what can be used as an encoder!