Z-test or T-test

Can you discuss the difference between the two tests and provide example when we use each one.