The t-test is used when we don't know sigma and need to estimate it with S.

In small samples we need the data to be from a normal distribution in either case.

When the sample size is big then we can approximate the test stat via the central limit theorem