On the underside of the mouse is a rubber ball that protrudes slightly from a cage containing two rollers set at right angles. As you roll the ball across the desktop , it turns the rollers, which in turn send horizontal and vertical positioning information back to your computer. Those signals tell the computer to make the mouse pointer on the screen move left, right, up and down. An optical mouse does not use a rolling ball. Instead, it bounces a beam of light from inside the mouse casing to a reflective pad and then back to a sensor on the mouse casing.
Optical mice have no moving parts, and they're less subject to mechanical failure.
However, they're limited in their movement to the boundaries of the reflective pad. These hybrids use a rubber ball to generate movement but interpret that movement with photo-interrupter discs that are turned by the internal rollers. Most mice communicate with a computer through a cord attached to a port on the back of the computer. Newer IBM-compatible machines have dedicated mouse ports, while older machines use a serial port . On most Macintosh computers, mice plug into the keyboard or the computer's Apple Desktop Bus port.