“عَلَّمَ” (ʿallama)means “He taught him” in this verse. It is a verb. an action or state word. Here it is perfect verb, verb pattern two, third person — masculine — singular.Corpus grammarV — third person masculine singular perfect verb.
“هُ” (hu)an attached pronoun meaning “he” or “him.”Corpus grammarPRON — third person masculine singular subject pronoun.