Inhomogeneous superconductors can host electronic excitations, known as Andreev bound states (ABSs), below the superconducting energy gap. With the advent of topological superconductivity, a new kind of zero-energy ABS with exotic qualities, known as a Majorana bound state (MBS), has been discovered. A special property of MBS wavefunctions is their non-locality, which, together with non-Abelian braiding, is the key to their promise in topological quantum computation. We focus on hybrid superconductor–semiconductor nanowires as a flexible and promising experimental platform to realize one-dimensional topological superconductivity and MBSs. We review the main properties of ABSs and MBSs, state-of-the-art techniques for their detection and theoretical progress beyond minimal models, including different types of robust zero modes that may emerge without a band-topological transition.