The method assumes that the results follow the normal distribution (also called student's t-distribution) if the null hypothesis is true. This null hypothesis will usually stipulate that there is no significant difference between the means of the two data sets.
It is best used to try and determine whether there is a difference between two independent sample groups. For the test to be applicable, the sample groups must be completely independent, and it is best used when the sample size is too small to use more advanced methods.
Before using this type of test it is essential to plot the sample data from the two samples and make sure that it has a reasonably normal distribution, or the student's t test will not be suitable. It is also desirable to randomly assign samples to the groups, wherever possible.
You might be trying to determine if there is a significant difference in test scores between two groups of children taught by different methods.
The null hypothesis might state that there is no significant difference in the mean test scores of the two sample groups and that any difference down to chance.
The student's t test can then be used to try and disprove the null hypothesis.
The two sample groups being tested must have a reasonably normal distribution. If the distribution is skewed, then the student's t test is likely to throw up misleading results. The distribution should have only one main peak (= mode) near the mean of the group.
If the data does not adhere to the above parameters, then either a large data sample is needed or, preferably, a more complex form of data analysis should be used.
The student's t test can let you know if there is a significant difference in the means of the two sample groups and disprove the null hypothesis. Like all statistical tests, it cannot prove anything, as there is always a chance of experimental error occurring. But the test can support a hypothesis.
However, it is still useful for measuring small sample populations and determining if there is a significant difference between the groups.