Lubricants are complex fluids consisting of a base oil and many different additives, and are used to control friction and wear between solid inorganic surfaces in relative motion. A review of recent work on molecular simulations of lubricants is given. It is shown that simulations can be used to uncover a lot of interesting behaviour, including additive adsorption, additive self-assembly, and a competition between the two. The specific examples to be discussed are: the adsorption of stearic acid and oleic acid in squalane on iron-oxide surfaces; the self-assembly of glycerol monooleate in bulk n-heptane; the adsorption and friction of glycerol monooleate in squalane on iron-oxide surfaces; and the conformations of functionalised copolymers in bulk n-heptane. The structures adopted by the additives can be correlated with the observed frictional properties, opening up the possibility of molecular-level design of new lubricants.