The tangible, visible, and material parts of a computer or other system is know as Hardware of system. Computer hardware comprises of electronic components, such as, CPU and monitor.
There are two types of hardware devices input and output:
A mouse is an input device that is important for graphical user interface because you can simply point to options and click a mouse button. These types of applications are often called point-and-click programs. A mouse may have one, two, or three buttons. The function of each button is determine by the program that uses the mouse.
Moving the mouse on a flat surface produces a corresponding movement of a pointer on the screen. “A mouse may be classified as a mechanical or an optical mouse, on the basis of the technology it uses. In a mechanical mouse, the ball that projects through the bottom surface rotates as the mouse is moved along a flat surface.
The direction of rotation is detected and relayed to the computer by the switches inside the mouse.
If am talking about optical mouse than, An optical mouse uses a light beam instead of a rotating ball to detect movement across a specially patterned mouse pad. MSC Corporation makes the optical mouse that uses Light Emitting Diode (LED) and photo-detectors to trap movement.