A Z-test is a statistical test used to determine whether two population means are different when the variances are known and the sample size is large. It calculates a Z-statistic, which represents the number of standard errors the sample mean is away from the population mean under the null hypothesis.