The technology to make "nanobots" is similar to what is done to manufacture electrical traces on microchips.
Cramming smaller and smaller components (resistors, conductors, switches, transistors, diodes, capacitors, etc) required the development of techniques which can also be used to create molecule sized mechanical parts.
Also the custom made DNA and custom cancer drugs which had been experimented with is on the nano scale.
Combining these things makes a lot of very small tech possible.
One trick is to use lasers to create a kind of "optical molasses" and slowly push a single atom around. Light and Mater become much closer to each other in terms of behavior at that scale. Carbon Bucky balls / fullerine can be created and attached to nano tubes (half a buckyball on each end), then doped with other elements to create all sorts of wires or filaments for mechanical purposes.
My son had a picture of a carbon nanotube doped with iron molecules on the cover of his organic chemistry text book and I spent a few days trying to read up on the tech to create such a thing and the properties and purpose of making such a thing.
The wacky thing was that there where these carbon rings that were kind of sharing electrons in such a way that all of them and none of them owned the electron and the Fe atom was sandwiched in between two rings and bonded to both rings (that is NOT to any specific carbon atom in the ring). I forget if the iron was to make it photovoltaic or conductive but it was one of those two. Similar macro-molecules could be made with other metals in the sandwiches to give the nanotube other properties. The carbon rings were bonded via carbon chains into the nano tube (with a variation of the regular graphite-like structure of the tube).
I read one non-fiction article about a dust particle sized spy-bot which used vibrating mirrors to communicate (external lasers provided the power) and two kind of telescoping wings to increase air buoyancy.
Google that stuff and there is a lot of interesting reading out there.
Also look for articles on "swarm robotics".