The properties and behavior of solvents and solutes inside a nanofluidic structure are not the same as in the bulk solution, but instead are strongly determined by the interactions of solvent and solute molecules with the walls of the structure. These interactions give rise to nanometre-scale boundary layers where the properties can strongly differ from the bulk. The chemical potential provides a convenient tool to describe these boundary layers, and as such is the focus of this tutorial review. The chemical potential of a solution component describes its energy level, which in this boundary layer is strongly influenced by the various interfacial forces between molecules in the wall and in the solution. These forces vary with distance and have a certain limited spatial range, which is reflected in the composition and thickness of the boundary layer in which both solute and solvent concentrations differ from their bulk values. We will consider a variety of solutes such as ions, uncharged molecules and gases, and surfaces that are both hydrophilic and hydrophobic. The boundary layer is oriented normal to the surface, but external forces can also be applied in parallel to the surface. Many interesting different nanofluidic transport phenomena then result, which will also be briefly mentioned in this tutorial review. By this common approach of using the chemical potential for nanofluidic systems of different composition, we aim to bring out the conceptual similarity between the different types of boundary layers and the different transport processes they can give rise to. Finally, as much as possible we will always mention (potential) real-life applications.