Aimed at graduates and potential researchers, this is a comprehensive introduction to the mathematical aspects of spin glasses and neural networks. It should be useful to mathematicians in probability theory and theoretical physics, and to engineers working in theoretical computer science.