Even though it may appear extremely complex, the fabrication of these machines is simple. They can be built like other machines, one piece at a time. To build a micro-engine you can build every gear and arm separately and then put everything together in the end. However building each of these pieces individually isn't so easy as conventional ones. For starters, its small size makes them difficult to handle individually and the tools we are used to are just too big to allow minimal caution. Another problem usually faced is the fact that the interactions between microscopic objects differ from the macroscopic interactions of our machines and the planning of a MEMS needs to be based on this philosophy.
Micro-electro-mechanical systems have several steps of construction. Similar to big machines, you can build each piece individually and assemble everything in the end. However, the individual fabrication is rather difficult and so each piece is usually made layer by layer, intercalating between structural and sacrificial material as necessary. The fabrication process is a three step cycle that is repeated again and again until every piece of the machine have built.
In the deposition phase a layer of structural or sacrificial material is created. After a layer covering the whole surface has been created, then a pattern is applied which will make out the various parts of that new layer. For example, you may apply UV radiation through a kind of "stencil" and provoke some changes in the topmost layer leaving some areas protected and others subject to the third step. The last step is etching. This process is dependent on the previous ones. The idea is to remove the vulnerable part left by the patterning step through chemical reactions or other methods and the result is a new non-planar layer at the top of the piece. This cycle is repeated for each layer until the final piece is finished.
When we have the final piece it is time to remove any leftover sacrificial material used to fill spaces between layers and allow the creation of complex pieces. This last step in the fabrication process is usually drowning the whole piece in a solvent which will dissolve only the sacrificial material without effecting the remaining parts.
Schematic of the fabrication cycle of MEMS
Even though the principles for building micro-electro-mechanical systems is very simples, there are many processes involved and many demand expensive state-of-the-art technology. These processes are described in the site.