The idea behind the anthropic principle is that the features of the universe that are necessary to support life can, in the end, be traced to the values of the fundamental physical constants. The fact that we are here then 'explains' why these constants have the measured values. This tutorial shows how this works in the case of the lifetime of the Sun, as far as is possible without involving detailed stellar structure theory. Our basic assumption is that the development of higher forms of life requires the lifetime of the Sun to be at least 109 years.