Explaining phenomena is a primary goal of science. Consequently, it is unsurprising that gaining a proper understanding of the nature of explanation is an important goal of science education. In order to properly understand explanation, however, it is not enough to simply consider theories of the nature of explanation. Properly understanding explanation requires grasping the relation between explanation and understanding, as well as how explanations can lead to scientific knowledge. This article examines the nature of explanation, its relation to understanding, and how explanations are used to generate scientific knowledge via inferences to the best explanation. Studying these features and applications of explanation not only provides insight into a concept that is important for science education in its own right, but also sheds light on an aspect of recent debates concerning the so-called consensus view of nature of science (NOS). Once the relation between explanation, understanding, and knowledge is clear, it becomes apparent that science is unified in important ways. Seeing this unification provides some support for thinking that there are general features of NOS of the sort proposed by the consensus view and that teaching about these general features of NOS should be a goal of science education.