Stand on a rusty nail and you will get tetanus, lockjaw, from the rust. It is why a rusty old nail is the classic backyard hazard, and why the question after any puncture is 'was it rusty?'. Rust equals tetanus, everyone knows it.
Rust does not cause tetanus; a bacterium does. Tetanus is caused by Clostridium tetani, whose spores live in soil, dust, and animal manure. When a deep puncture wound drives those spores into the low-oxygen environment under your skin, they can grow and release a toxin that causes the painful muscle spasms of tetanus. The rust connection is coincidental: nails and tools that are rusty have usually been lying outdoors in exactly the dirt and muck where the bacterium lives, so a rusty nail is often a contaminated nail, and a deep puncture is exactly the kind of wound the bug likes. But a perfectly clean, shiny nail carrying the spores could give you tetanus, and a rusty one stored in a sterile box could not. You can also get tetanus from a splinter, a garden scratch, or a bite. The real protection is not avoiding rust; it is keeping your tetanus vaccination up to date, which is the genuinely effective defence.