Encoders in general come in 2 main types, Incremental or Absolute. An absolute encoder outputs ( usually in gray code or similar ) the exact radial postion as a number. Likewise, an incremental encoder simply outputs a square wave from which you must count the pulses. Most incremental encoders used for motor position control have at least 3 outputs as a minimum. (some encoders also provide the inverse outputs as well, used for error checking.)
The outputs are generally known as A, B and Z. A and B are continuous 50% duty cycle TTL level signals with B being electrically 90 degrees out of phase from A. The reason for this is that you can read whether A or B is first to rise, thus if turning for example clockwise, A will rise first or anti clockwise B will rise first. Counting the pulses will give you ratational position information and if needed, speed.
The Z pulse is generally a single pulse once per revolution. It is most often used within a homing or start position setting procedure. A common form of its use is for example a motor driving a machined lead screw. During the "homing" procedure, the motor will drive in a high speed, moving whatever is attached to it (eg an X,Y table) A cam striker fitted to this table activates a limit switch. When this switch is operated, the motor reduces speed to a creeping pace whilst the controller looks for the next instance of the Z pulse. When this pulse is received, this position then is recorded by the controller as it home datum from which all position of the motor is measured.
Motors used for positioning are commonly called AD or DC servo motors. They are specifically designed with a very high number of poles (compared to a standard induction motor). The reason being that the greater the number of poles, the far more acurate speed and position can be controlled. The electronics involved in controlling the motor are generally very complicated. This is due to designs requiring hi speed, hi torque yet lo currents. Just about all aspects of the motor ( acceleration etc) can be controlled to fine detail. Vector control is very popular at the moment.
Search the web for info on motion control and you will find what you seek. How do I know all this?...Coz I work as a Motion control and Industrial Robotics Engineer for more years than I can remember
Jaba
P.S. Sorry for the logwinded reply, I tried to keep it short and sweet.