A nanobot is a nanotechnological robot nanomachine, also called a nanite, which is a mechanical or electromechanical device whose dimensions are measured in nanometres (millionths of a millimetre, or units of 10-9 metrer).
Nanomachines are largely in the research-and-development phase, but some primitive devices have been tested. An example is a sensor having a switch approximately 1.5 nanometers across, capable of counting specific molecules in a chemical sample. The first useful applications of nanomachines will likely be in medical technology, where they could be used to identify pathogens and toxins from samples of body fluid. Another potential application is the detection of toxic chemicals, and the measurement of their concentrations, in the environment.
Development of such machines is characterized under the field of nanorobotics.
Since nanorobots would be microscopic in size, it may be necessary for very large numbers of them to work together to perform macroscopic tasks. These nanorobot swarms, both those which are incapable of replication (as in utility fog) and those which are capable of unconstrained replication in the natural environment (as in grey goo and its less common variants) are found in many science fiction stories, such as the nanoprobes in Star Trek. The word "nanobot" (also "nanite") is often used to indicate this fictional context and is an informal or even pejorative term to refer to the engineering concept of nanorobots. The word nanorobot is the correct technical term in the nonfictional context of serious engineering studies  (http://www.nanomedicine.com).
The current view is that nanorobots capable of replication outside of a restricted factory environment do not form a necessary part of a productive nanotechnology, that the process of self-replication can be made inherently safe, and free-foraging replicators are in fact absent from current plans for developing and using molecular manufacturing.
Medical nanotechnology is often expected to utilize nanorobots injected into the patient to perform their treatment on a cellular level. Such nanorobots intended for use in medicine also might not replicate  (http://www.nanomedicine.com/NMI/2.4.2.htm#p19), as this would needlessly increase device complexity, reduce reliability, and interfere with the medical mission. Instead, medical nanorobots may be manufactured in carefully controlled nanofactories in which nanoscale machines are solidly integrated into a desktop-scale machine that builds macroscopic products.