Several aspects in the field of molecular self assembly are addressed in this thesis. Thanks to the scanning tunnelling microscope (STM), structural, electronic and magnetic properties on surfaces can be studied down to the size of a single atom. In this thesis, I designed and built a STM operating in ultra high vacuum at liquid helium temperature. In Chapter 2 I highlight the design and key features of this system. I describe the development of UHF cabling under severe design constraints, intended to be used for a state of the art STM time resolved technique with nanosecond time resolution. The performance of the instrument is demonstrated by a few benchmark measurements. The arrangement of molecules on surfaces is sensitive to intermolecular interactions, but also to molecule-surface interactions. The surfaces used as support for molecules must therefore be well characterized from the structural, chemical and electronic points of view. Using STM, work function (WF) variations at the nanoscale on hexagonal boron nitride on rhodium (h-BN/Rh(111)) are investigated. These variations are the key to understanding the arrangement of molecules on this surface, yet their magnitude is disputed. Local WF is measured in two ways and compared with KPFM maps. The results provide insight about hot electronic states near surfaces, called image potential state, and their lifetimes. A new phase of h-BN/Rh(111) was discovered and a preliminary characterization of its origin is presented. STM can provide valuable information for understanding the arrangement and the electronic properties of molecules on surfaces. These capabilities are harnessed in Chapter 4 to study large molecules on metallic surfaces, and on thin dielectric surfaces. Angiotensin-II is a peptide, comprising 8 amino acids, small enough to fit in the nanometric cavities of h-BN/Rh(111). This peptide can be brought to the surface intact using electrospray ion-beam deposition. On a Cu surface, we observe that the peptides interact strongly with the substrate, and this interaction determines their arrangement and electronic properties. However, on a single layered sheet of h-BN/Rh(111), the peptides are sufficiently decoupled from the metal, and their electronic properties conserved. In a series of preliminary measurements, these electronic properties are studied in order to discriminate between the amino acids the peptide is made of. Additional strategies that may enable peptide sequencing by STM are discussed. Turning to still larger molecules, cytochrome-C is a protein made of 104 amino acids. On plain metal surfaces, its size and flexibility make the number of conformations available to it enormous. In Chapter 5 this protein is deposited on a nanopatterned surface, forcing it to adhere to a square grid. This makes the number of possible conformations manageable. A detailed look at these conformations reveals many details about how the proteins move on the surface and find their place on the grid. For example, it can inferred that short segments of the protein can diffuse on the surface at room temperature, while longer segments are immobilized. The critical length where diffusion begins is used to estimate the diffusion barrier energy. Furthermore, a simplified simulation of the landing process yields a good fit to the experimentally observed conformation distribution. This fit confirms the flexibility of the proteins and the negligible role of the amino acid side chains.