Molecular junctions work by facilitating the flow of electrical current through a molecule. The basic setup involves a molecule connected to two metal electrodes. When a voltage is applied across the electrodes, electrons can tunnel through the molecule, generating a current. The electrical properties of the junction depend on the type of molecule, the nature of the electrodes, and the interface between them.