It is rarely practical or possible to measure every single member of a population, and as such a random sample is drawn from the population of interest.
Normally, the sample mean should equal the population mean. If it does not, it could be due to:
Z tests allow determination of whether the difference is true or not. T tests can be used instead if n is less than 30. Different curves are used because with smaller samples there is more of a chance for error or variance.