It seems quite confusing to me when to use a Z or T test for hypothesis testing.

I know that when alpha is known, then use a Z-Test and when alpha is not known then use a T-Test, but isn't alpha the significance level, which is always told to us. I've been shown both test and it seemed that they both contained alpha, which althoughly confuses me.

If someone could explain the difference and when to use what, it would be great.

Cheers