The Tetanus Shot that the doctor gives you should begin working within a few minutes after you're injected with the Tetanus Shot.
Tetanus Shots last for up to 10 years so you only need to get a new Tetanus Shot once every ten years even if you step on a rusty nail or something else.
If you haven't had a Tetanus Shot and stepped on a rusty nail or got cut with some rusty metal etc then you need to get vaccinated with a Tetanus Shot within 48 hours to prevent infection or even death due to the Tetanus.