The work presented in this thesis covers two different topics of surface science, both investigated with the scanning tunneling miscroscopy and spectroscopy at low temperatures (5~K). First, we are interested in the spectroscopic properties of physisorbed H2 (and D2) layers on metallic samples. The energy of the first rotational quantum state transition for H2 (D2) is characterized on a variety of metallic substrates. For homonuclear molecules, these rotational quantum states are directly dependent on the nuclear spin arrangement. Thus the rotational spectroscopy of molecular H2 (D2) allows for unprecedented spatial resolution of nuclear spin configurations. To isolate one physisorbed molecule from the surface, we grow Xe islands before exposing the sample to H2 (D2). Reducing the Xe islands size to support only one molecule would allow us to probe the rotational quantum state at the individual molecule level. We show that rotational spectroscopy of H2 (D2) on Xe islands is feasible. We find that this method is not viable to isolate a H2 (D2) molecule as small Xe islands become unstable in presence of them. The second topic deals with the adsorption of metallic atoms on thin MgO(100) films grown on a Ag(100) substrate. We use Ca-doping of the MgO layer to identify the Mg lattice positions. Subsequent adsorption of Ho allows the determination of their adsorption site, on top of the O and on the bridge site, halfway between two O (Mg) lattice positions. The abundance of the population over these sites differs with the MgO thickness. On the MgO monolayer, the Ho adatoms are distributed following the abundance of these sites, i.e., 1/3 and 2/3, respectively. On the MgO bilayer, exclusively the O site is populated. Atomic manipulation of the Ho adatoms with the STM tip permits the creation of a new species, adsorbing on the Mg site, which was correctly predicted by DFT. Adsorption sites for other metal atoms have further been measured. Dy and Er adsorb on the bridge and O site, with abundances depending upon the atomic species and the MgO thickness. Au adsorbs exclusively on bridge sites. Fe and Co populate uniquely the O site, independent of MgO thickness, while Tb adsorbs on all the three sites, i.e., O, bridge, and Mg. We finally investigated the Ho adsorption sites as a function of deposition and annealing temperature. Ho atoms on the O site become unstable at a temperature between 58 K and 77 K, while Ho atoms on the bridge site start to diffuse only at 125 K. This results in a hopping to the bridge site of all the Ho adatoms adsorbing on O between 58 K and 77 K. Additionally, we show that evaporation of Ho on the MgO bilayer held at 30 K gives rise to adsorption on almost uniquely bridge sites, in neat contrast to what is found for lower temperature (approximatively 10 K). We interpret this result as the action of entropy which changes the free energy of the two types of adsorption site as the temperature increases. Ideas for the source of entropy are given, but the amount of entropy needed to explain our observations is unrealistically large.