||Nanostructures, namely materials in the nanometer or sub-nanometer scales, can possess completely different properties from their bulk counterparts. Due to the potential applications in different disciplines, the study of nanostructures has attracted extensive attention worldwide in recent years. Metal nanostructures grown on semiconductor substrates are a special group of nanostructures. Since these nanostructures can be prepared in ultrahigh vacuum with high controllability, one can use low-temperature scanning tunneling microscopy (STM) to obtain information in situ on both the structural and electronic properties of these nanostructures simultaneously. In this thesis, I will present the growth behavior of metal or semiconductor nanostructures at the initial stage and the novel electronic properties of some of these nanostructures. The study of single Ge atoms adsorbed on the Si(111)-7 x 7 surface shows that different deposition temperatures result in different adsorption structures. We find Ge substitution for the Si adatoms during high temperature growth and simple Ge adsorption above the Si atoms during low temperature growth. Small Ag clusters, formed on the Si(111)-7 x 7 surface at controlled coverages, show a strong rectification effect, which is an indication of the initial stage of Schottky barrier formation and possibly the smallest Schottky diode. On the surfaces of heavily n-doped and p-doped Si substrates, although the 7 x 7 is metallic at room temperature, an energy gap opens at low temperatures. This energy gap is correlated well with the electronic localization induced by the doping impurities. For Pb nanoislands, a pseudogap was discovered at temperatures higher than the superconducting transition temperature. The strength of the pseudogap depends on the lateral size and temperature, which is speculated to originate from the weak electronic localization induced by structural disorder.