The basic principle is that by moving the mouse, the cursor (pointer) on the screen moves in the same manner. Actions can be carried out by clicking one of up to three buttons on the mouse.
As the mouse is moved across a surface, a ball underneath rolls along with it. This ball turns small wheels (usually three of them) inside the mouse. The amount each wheel turns is measured and this movement is translated into the movement of the cursor.
Because the ball underneath must roll for the mouse to work, it has to remain on a flat surface. The surface must also have a certain amount of friction for the ball to roll. Although you can get a certain amount of movement by shaking the mouse, picking it up and expecting the cursor to move is a waste of time.
Originally, mice were connected by a thin cable to the computer. As technology has progressed, the cable was done away with and replaced with a light-emitting diode (LED) on the mouse and a photodetector near the computer. This has the advantage of preventing the cable from tangling or getting buried under a pile of papers and thereby limiting the mouses movement. The disadvantage is that the LED must remain within the line-of-sight of the photodetector to function. Some manufacturers have overcome this disadvantage by using an alternate form of light that does not depend on line-of-sight: radio.
Another major problem with all of these kinds of mice is desk space. My desk is not neat. Space is at a premium. Even the small space needed for a mouse pad is a luxury that I rarely have. Fortunately, companies such as Logitech have heard my cries and come to the rescue. The solution is, as an old UNIX guru called it, a dead mouse.
This is a mouse that lies with its feet (or, at least, the ball) sticking up. Rather than moving the mouse to move the ball to move the wheels to move the cursor, you simply move the ball. The ball is somewhat larger than the one inside of a mouse, which makes it a lot easier to move. Such a mouse is called a trackball and is very common with laptop computers. Provided the signals sent to the operating system are the same, a trackball behaves similarly to a mouse.
The mouses interface to the operating system can take one of three forms. The mouse is referred to, based on this interface, as a serial mouse, bus mouse, or keyboard mouse.
As its name implies, a serial mouse is attached to your computer through a serial port. Bus mice have their own interface card that plugs into the bus. Keyboard mice, despite their name, usually do not plug into the keyboard. Though I have seen some built into the keyboard, these were actually serial mice. Instead, a keyboard mouse is plugged into its own connector, usually next to the keyboard connector, which is then attached directly to the motherboard. These mice are usually found on IBM PS/2 and some Compaq computers, though more computer manufacturers are providing a connector for a keyboard mouse.
When people talk about the movement of the mouse, you often hear the term resolution. For a mouse, resolution is referred to in terms of clicks per inch, or CPI. A click is simply the signal sent to the system to tell it that the mouse has moved. The higher the CPI, the higher resolution. Both mice and trackballs have resolution, because both rely on the movement of a ball to translate the movement of the cursor.
Keep in mind that despite how it appears at first, a mouse with a higher resolution is not necessarily more precise. In fact, almost the opposite is true. Higher resolution means that the mouse moves further for each given movement on the ball. The result is that the movement is faster, not more precise. Because precision is really determined by your own hand movement, experience has shown me that you get better precision with a mouse that has a lower resolution.