How are Chinese people taught Chinese Hanzi? I don't study Chinese at all, nor have any plans to, I just wanted wanted to ask a basic question on how Chinese people learn Hanzi. I study Japanese, so I study Kanji, which is the use of Chinese characters in Japanese writing, and I learn the readings by using the other scripts in Japanese, Hiragana and Katakana for the Kun and On readings respectively. For example I learned 人 as ひと、と、り for the Kun readings, and ニン、ジン for the On readings, now for Chinese, it's apparently just rén, in Pinyin, but are Chinese people taught Pinyin to learn readings, or do they learn by hearing them, then using other Hanzi's sounds to learn a new Hanzi with the same sound?
I know this isn't really a question about the Chinese language itself, it's more about how people learn it, but I thought I'd ask anyway because I couldn't find a clear answer online.
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.