The formation of bound states at surfaces of materials with an energy gap in the bulk electron spectrum is a well known physical phenomenon. At superconductor surfaces, quasiparticles with energies inside the superconducting gap may be trapped in bound states in quantum wells, formed by total reflection against the vacuum and total Andreev reflection against the superconductor. Since an electron reflects as a hole and sends a Cooper pair into the superconductor, the surface states give rise to resonant transport of quasiparticle and Cooper pair currents, and may be observed in tunnelling spectra. In superconducting junctions these surface states may hybridize and form bound Andreev states, trapped between the superconducting electrodes. In d-wave superconductors, the order parameter changes sign under 90 • rotation and, as a consequence, Andreev reflection may lead to the formation of zero energy quasiparticle bound states, midgap states (MGS). The formation of MGS is a robust feature of d-wave superconductivity and provides a unified framework for many important effects which will be reviewed: large Josephson current, low-temperature anomaly of the critical Josephson current, π -junction behaviour, 0 → π junction crossover with temperature, zero-bias conductance peaks, paramagnetic currents, time reversal symmetry breaking, spontaneous interface currents, and resonance features in subgap currents. Taken together these effects, when observed in experiments, provide proof for d-wave superconductivity in the cuprates.