The z-test is a statistical test for hypothesis testing that uses the standard normal distribution as the sampling distribution of the test statistic. A common example is the test for the difference of two proportions, but this is not the only possibility. Let $X = X_1, X_2, ..., X_n$ be iid with mean $\mu$ and standard deviation $\sigma$. A z-test for the null hypothesis $H_0: \mu = \mu_0$ is
$$Z = \frac{\bar{X}-\mu_0}{\sigma / \sqrt{n}}$$
which is distributed as a standard normal. The null is rejected at the 95\% level of significance if $|Z|>1.96$. Or equivalently reject if $|\bar{X} - \mu_0|>1.96\sigma / \sqrt{n}$, i.e. if $\bar{X}$ is more than 1.96 standard errors away from $\mu_0$. Unlike the t-test, the critical values for the z-test are independent of the sample size which makes it convenient to use. However, the z-test depends on the knowledge about the population variance. So the t-test may still be preferred if the sample size is small or when the population variance is unknown (when $\sigma$ must be estimated).