Questions & Answers about Я часто думаю о нём вечером.
Because думать in the meaning to think about normally takes о + Prepositional case:
думать о ком? о чём? = to think about whom? about what?
So:
- о нём = about him
- о ней = about her
- о тебе = about you
Using его here would be wrong, because его is not the form required after о in this meaning.
нём is the Prepositional singular form of он.
The full pattern is:
- он
- о нём
Russian third-person pronouns often add an initial н- after prepositions:
- у него
- к ней
- с ним
- о нём
So the н- is not random; it is a regular feature of these pronoun forms after prepositions.