I was watching a TV program, when he ______ in.

I was watching a TV program, when he ______ in.

Explanation

I was watching a TV program when he walked in.

The past tense "walked" is used to match the past continuous tense of the main action.