Neutron scattering is a direct probe of mass and magnetization density in solids. We start with a brief review of experimental strategies for determining the mechanisms of superconductivity and how neutron scattering contributed towards our understanding of conventional superconductors. The remainder of the article gives examples of neutron results with impact on the search for the mechanism of superconductivity in more recently discovered, `exotic', materials, namely the heavy fermion compounds and the layered cuprates.