A nanometer (also "nanometre") is a unit of measurement used to measure length. One nanometer is one billionth of a meter, so nanometers are certainly not used to measure long distances. Instead, they serve to measure extremely small objects, such as atomic structures or transistors found in modern CPUs.
A single nanometer is one million times smaller than a millimeter. If you take one thousandth of a millimeter, you have one micrometer, or a single micron. If you then divide that micron by 1,000, you have a nanometer. Needless to say, a nanometer is extremely small.
Since integrated circuits, such as computer processors, contain microscopic components, nanometers are useful for measuring their level of detail. In fact, different eras of processors are often defined in nanometers. For example, recent technologies from Intel include the 45-Nanometer, 32-Nanometer, and 22-Nanometer process. The number of each process defines the distance between transistors and other components within the CPU. The smaller the number, the more transistors that can be placed within the same area, allowing for faster, more efficient designs.