beat into one's head
Also, knock or drum into one's head. Force one to learn something. For example, Hard as I try, I can't seem to beat the correct safe combination into my head, or He promised to drum the numbers into my head by morning, or Whether we liked it or not, the English department was determined to knock Shakespeare into our heads. Although beat implies violence, the first term, from the early 1500s, usually alludes more to a repeated striking of blows, that is, repetition or drilling; likewise with drum (alluding to drumbeats), which dates from the early 1800s.