1. Mice use an optical system to track motion by taking pictures with a camera sensor and detecting pattern changes between images to determine movement.
2. Inside the mouse is a ball that rolls and turns rollers connected to an encoding disk with holes. Infrared LEDs and sensors count light pulses from the disk to translate motion into digital data.
3. This data is sent through the mouse's PS/2 connector to the computer as three bytes per report, indicating button states, direction flags, and movement amounts in X and Y coordinates.