Affecting the current through a molecular or nanoscale junction is usually done by a combination of bias and gate voltages. Magnetic fields are less studied because nanodevices can capture only low values of the magnetic flux. We review recent work done with the aim of finding the conditions for magnetic fields to significantly affect the conductance of such junctions. The basic idea is to create narrow tunneling resonances through a molecular ring-like structure that are highly sensitive to the magnetic field. We describe a computational method that allows us to examine atomistic models of such systems and discuss several specific examples of plausible systems, such as the quantum corral, carbon nanotubes, and polycyclic aromatic hydrocarbon molecules. A unique property of the magnetic field, namely, its ability to split degenerate levels on the ring, is shown to allow prototypes of interesting new nanoscale devices, such as the three-terminal parallel logic gate.