Drum (something) into (someone’s) head

To make someone learn something by force.

The teacher worked hard to drum the formulas into the heads of the students.