The previous answers by kirby, michael-berkowski, and pykler are great.
I had this issue in Vim on macOS's terminal. Checking Terminal → Preferences → Profiles → Keyboard showed that "Clear (Keypad)" was mapped to "Num Lock". Pressing clear fixed the issue for me.