Use of different formulas to calculate the Z-score



I am a little new to statistics and I came across calculating the Z-score while going through sampling and estimation techniques and I read two formulas for calculating the Z-score.
One formula uses only std.deviation in the denominator and the other uses std.deviation/sqrt(n). I am a little confused and wanted to know when to use which formula.


In statistics, a random variable X is standardized by subtracting its expected value and dividing the difference by its standard deviation. If the random variable under consideration is the sample mean of a random sample X1,X2,… Xn of X then we subtract the random variable by its expected value which is then divided by the ratio of standard deviation and sqrt(n).