There are several types of sensors that can be used
1) Incremental encoders: give pulses to say they've moved some part of a rotation. Quadrature encoders can tell which direction, pulsed encoders give a special pulse every revolution
2) Absolute encoders: these come in two common varieties, optical and magnetic (as Michael pointed out above). These are the most commonly used in FRC application that require infinite angular sensing
3)
Infinite rotation potentiometers: quite simply these are pots that have no hard stops. They do exist, but they're usually not very good for this type of application because tend to have a dead-band.