Verbs such as 'give', 'teach' and 'tell' are known as ditransitive. Where their direct object is a personal pronoun (typically 'it'), the recipient in standard usage will normally follow the direct object and be preceded by 'to' (a so-called 'prepositional indirect object'), e.g.
He gave it to us.
(cf. informal/dialectal He gave us it.)
but otherwise they follow the pattern [V + I.O. + D.O.] (i.e. without 'to'), as in
I'll tell you this.
(demonstrative pronoun as D.O.)
He taught them maths.
(noun as D.O.)
He told them what to do.
(clause as D.O.)
and so forth.