This document discusses metal-semiconductor junctions, including Schottky barriers and ohmic contacts. It describes how Schottky barriers form at the junction between a metal and an n-type or p-type semiconductor due to the difference in work functions between the materials. The barrier height determines whether the junction rectifies or forms an ohmic contact. Ohmic contacts are achieved by reducing the barrier height through heavy doping or making the depletion width narrow enough for carriers to tunnel through. Surface states can also pin the Fermi level and affect the barrier height.