The five-yard zone
As the receiver comes off the line, the man covering him may hit him with his hands, once or for as long as they stay in touch, to knock him off his path. That is a jam, and it is the whole idea of press coverage. At five yards it has to stop.
The rule holds only while the quarterback is in the pocket with the ball. If he runs out of it, or throws, it no longer applies. After the throw the question becomes pass interference.
Why it exists
In the 1970s defenders could hit receivers all the way down the field, and passing was miserable. In 1978 the professional rule limited contact to five yards, and the passing game of today begins there.
College has no such rule. There a defender may use his hands on a receiver in front of him until the ball is thrown.
Hands to the face
A blocker and a rusher are fighting at arm’s length, and somebody’s hand slips up under a helmet. If it stays there, or the head goes back, it is illegal use of hands. On the offense it costs ten yards. On the defense it costs five, and a first down.
Professional rules reference: 2026 NFL rulebook