A good understanding of how students understand physics is of great importance for developing and delivering effective instructions. This research is an attempt to develop a coherent theoretical and mathematical framework to model the student learning of physics. The theoretical foundation is based on useful ideas from theories in cognitive science, education, and physics education. The emphasis of this research is made on the development of a mathematical representation to model the important mental elements and the dynamics of these elements, and on numerical algorithms that allow quantitative evaluations of conceptual learning in physics. Model analysis is used to determine common student models. The theory is applied to student understanding of quantum mechanics. Multiple-choice instruments to probe student models and a set of quantum tutorials are developed.