The short answer is that you use the student t-test when you do not know the population standard deviation.
When performing a hypothesis test for the mean, the null hypothesis is that the given population mean mu is correct and the alternative hypothesis is that the given population mean is incorrect. (The alternative hypothesis can be either one- or two-tailed; that is, we can assume the population mean is actually greater than, less than, or just different from the given mu.)
We test the null hypothesis by computing the critical value(s) and the test value. The critical value demarcates critical region(s). If the test value falls in a critical region, we reject the null hypothesis, otherwise we do not reject the null hypothesis. In order to compute the test value and the critical value(s), we must determine the type of test to run. If we know the population standard deviation, we can use the standard normal z-distribution. If, however, we do not know the population standard deviation we must use the student's t-distribution.
Without the population standard deviation we must use some approximation—usually the standard deviation of the sample. But we know that the sample standard deviation is too small, so we introduce a correction factor. The t-distribution takes into account the changing correction factor (determined by the sample size). For large samples, the t-distribution approaches the standard distribution.
Example: Suppose we are told that the average strawberry has 200 seeds. A random sample of 10 strawberries has a mean of 185.2 seeds with a standard deviation of 10. We want to test if the average number of seeds is actually less than 200.
1. The null hypothesis H0 is mu=200, while the alternative hypothesis H1 is mu<200
2. We use the t-distribution to compute the critical value as we do not know the pop. std. dev. From the t-table with d.f.=9 we get c.v.=-2.262
3. The test value is t=-4.585
4. Since the test value is in the critical region (p=.0006<alpha=.05) we reject the null hypothesis.
5. We conclude that there is sufficient evidence to conclude that the population mean is less than 200.