Molecular machines can be divided into two broad categories; artificial and biological. In general, artificial molecular machines (AMMs) refer to molecules that are artificially designed and synthesized whereas biological molecular machines can commonly be found in nature.
A wide variety of artificial molecular machines (AMMs) have been synthesized by chemists which are
rather simple and small compared to biological molecular machines.
The first AMM, a molecular shuttle, was synthesized by Sir J. Fraser Stoddart. 
A molecular shuttle is a rotaxane molecule where a ring is mechanically interlocked onto an axle with two bulky stoppers. The ring can move between two binding sites with various stimuli such as light, pH, solvents, and ions.  As the authors of this 1991 JACS paper noted: “Insofar as it becomes possible to control the movement of one molecular component with respect to the other in a rotaxane, the technology for building molecular machines will emerge.”, mechanically interlocked molecular architectures spearheaded AMM design and synthesis as they provide directed molecular motion.  Today a wide variety of AMMs exists as listed below.
Overcrowded alkane molecular motor.
Molecular motors are molecules that are capable of rotary motion around a single or double bond.
Single bond rotary motors  are generally fueled by chemical reactions whereas double bond rotary motors  are generally fueled by light. The rotation speed of the motor can also be tuned by careful molecular design.  Carbon nanotube nanomotors have also been produced. 
A molecular propeller is a molecule that can propel fluids when rotated, due to its special shape that is designed in analogy to macroscopic propellers.   It has several molecular-scale blades attached at a certain pitch angle around the circumference of a nanoscale shaft. Also see molecular gyroscope.
Daisy chain rotaxane. These molecules are considered as building blocks for artificial muscle.
A molecular switch is a molecule that can be reversibly shifted between two or more stable states.  The molecules may be shifted between the states in response to changes in pH, light, temperature, an electric current, microenvironment, or the presence of a ligand.   
Rotaxane based molecular shuttle.
A molecular shuttle is a molecule capable of shuttling molecules or ions from one location to another.  A common molecular shuttle consists of a rotaxane where the macrocycle can move between two sites or stations along the dumbbell backbone.   
Nanocars are single molecule vehicles that resemble macroscopic automobiles and are important for understanding how to control molecular diffusion on surfaces. The first nanocars were synthesized by James M. Tour in 2005. They had an H shaped chassis and 4 molecular wheels (fullerenes) attached to the four corners.  In 2011, Ben Feringa and co-workers synthesized the first motorized nanocar which had molecular motors attached to the chassis as rotating wheels.  The authors were able to demonstrate directional motion of the nanocar on a copper surface by providing energy from a scanning tunneling microscope tip. Later in 2017, worlds first ever Nanocar race took place in France.
A molecular balance is a molecule that can interconvert between two and more conformational or configurational states in response to the dynamic of multiple intra- and intermolecular driving forces, such as hydrogen bonding, solvophobic/hydrophobic effects, π interactions, and steric and dispersion interactions.
Molecular tweezers are host molecules capable of holding items between their two arms.  The open cavity of the molecular tweezers binds items using non-covalent bonding including hydrogen bonding, metal coordination, hydrophobic forces, van der Waals forces, π interactions, or electrostatic effects.  Examples of molecular tweezers have been reported that are constructed from DNA and are considered DNA machines. 
A molecular sensor is a molecule that interacts with an analyte to produce a detectable change.  Molecular sensors combine molecular recognition with some form of reporter, so the presence of the item can be observed.
A molecular logic gate is a molecule that performs a logical operation on one or more logic inputs and produces a single logic output.   Unlike a molecular sensor, the molecular logic gate will only output when a particular combination of inputs are present.
A molecular assembler is a molecular machine able to guide chemical reactions by positioning reactive molecules with precision.
Bird-looking analogy of a molecular hinge
A molecular hinge is a molecule that can be selectively switched from one configuration to another in a reversible fashion. Such configurations must have distinguishable geometries, for instance, Cis or Trans isomers of a V-shape molecule. Azo compounds perform Cis–trans isomerism upon receiving UV-Vis light.
A ribosome translating a protein
The most complex macromolecular machines are found within cells, often in the form of multi-protein complexes. Some biological machines are motor proteins, such as myosin, which is responsible for muscle contraction, kinesin, which moves cargo inside cells away from the nucleus along microtubules, and dynein, which moves cargo inside cells towards the nucleus and produces the axonemal beating of motile cilia and flagella. "[I]n effect, the [motile cilium] is a nanomachine composed of perhaps over 600 proteins in molecular complexes, many of which also function independently as nanomachines...Flexible linkers allow the mobile protein domains connected by them to recruit their binding partners and induce long-range allostery via protein domain dynamics. " Other biological machines are responsible for energy production, for example ATP synthase which harnesses energy from proton gradients across membranes to drive a turbine-like motion used to synthesise ATP, the energy currency of a cell. Still other machines are responsible for gene expression, including DNA polymerases for replicating DNA, RNA polymerases for producing mRNA, the spliceosome for removing introns, and the ribosome for synthesising proteins. These machines and their nanoscale dynamics are far more complex than any molecular machines that have yet been artificially constructed.
Some biological molecular machines
These biological machines might have applications in nanomedicine. For example, they could be used to identify and destroy cancer cells. Molecular nanotechnology is a speculative subfield of nanotechnology regarding the possibility of engineering molecular assemblers, biological machines which could re-order matter at a molecular or atomic scale. Nanomedicine would make use of these nanorobots, introduced into the body, to repair or detect damages and infections. Molecular nanotechnology is highly theoretical, seeking to anticipate what inventions nanotechnology might yield and to propose an agenda for future inquiry. The proposed elements of molecular nanotechnology, such as molecular assemblers and nanorobots are far beyond current capabilities.