Both, z-statistic and t-statistic are the ratio of the estimate (usually a difference of means) and the standard error of the estimate. The only difference is that the z-test assumes that the standard error is known, whereas the t-test assumes that the standard error is also just an estimate, made from the same data.
At no time there is the standard deviation involved.
A = a statistic (e.g., a mean, the difference between two means, the natural log of an odds ratio, a correlation coefficient, etc.)
B = the value of the parameter corresponding to A, given a true null hypothesis
C = the standard error (SE) of A
As Jochen noted, when the population SE is known, this ratio yields a z-value which can be evaluated against the standard normal distribution. When the population SE is not known, it must be estimated from sample data, and in that case you get a t-ratio, not a z-ratio. And finally, the test will be reasonably valid when the sampling distribution of A is approximately normal.
@Bruce: C is the standard error of the difference (A-B). The test does not care about the sampling distribution of A, only about the sampling distribution of (A-B).
Jochen, I assume you are thinking of the independent groups t-test. I am talking about z and t-tests in general. I think a couple examples will clarify what I meant.
For the independent groups t-test in my A-B-C scheme:
A = Xbar1 - Xbar2
B = mu1 - mu2 | H0
C = SE(A) = SE(Xbar1-Xbar2)
For a single-sample t-test, on the other hand:
A = Xbar
B = mu | H0
C = SE(A) = SE(Xbar)
And in both cases, t = (A-B)/C.
For the independent groups t-test, B is most frequently set to 0, and in that case, most authors don't bother including it when they write out the equation. But there is no requirement that B must equal 0: It is possible to test a null hypothesis specifying a non-zero difference between the population means.
Here's one more example. For a z-test on ln(OR) from a 2x2 table:
A = ln(OR)
B= population parameter corresponding to A = 0 in most cases
C = SE(A) = SE(ln(OR)) = SQRT(1/a+1/b+1/c+1/d)
And z = (A-B)/C, as always.
In general terms:
A = a statistic
B = the value of the parameter corresponding to A according to H0