Sounds that are the same but different kanji, how do you know which

I'm a beginner, and I find listening to songs quite useful. But I come across this line:

今いまでも青あおが棲んでいる

今いまでも青あおは澄んでいる

When someone hears this, how do they know which kanji is being used? Cuz I thought 棲 and 澄 sound the same in this context. Also, does it sound the same if it's 住んでいる? Because when I first heard it I was almost certain it's 住んでいる!

How do you know what people are talking or singing about just by hearing it?

by magpie-pie