How are Chinese people taught Chinese Hanzi?
I can give a short answer to this question. I would say both. When I entered primary school and started to learn Hanzi systematically, Pinyin is the very first thing to learn, and we learn the sounds of Hanzi by checking their Pinyin. The following picture of a typical primary school 语文 textbook shows how this work:

But the other guess of yours is also right to some extent. In learning Hanzi in primary schools, we always do the 同音字练习, which is an exercise to match a Hanzi to another which has the same pronunciation, and that's helpful. Also, given that many Hanzi (especially their pronunciations) are not learned from the school at all, we learn them by simply hearing and repeating, as you also mentioned.