How do some bacteria help plants get the nitrogen they need to survive?

Nitrogen- fixing bacteria consume nitrogen in the air and change it into a for that plants can use.