An NC machine, instead of having wheels like a manual machine, accepts instructions and numbers. But unlike a CNC machine, a computer is not feeding it those instructions and numbers.
An NC machine comes with a special typewriter thing that you use to write your program and it produces the punch cards or magnetic tapes that the NC machine accepts. You then take the tape or card and put it into the machine and it directly runs through the instruction set. A key distinction from a CNC machine seems to be the fact the "program" in an NC machine is run straight from beginning to end, and you traditionally could not just "drop in" and make an edit in the middle, unlike computer software. If you want to debug, fix it, or make a change, you have to make a whole new tape or card set.
The fact we have desktop computers now that could produce magnetic tape (or punch cards) to stick into the NC machine eases programming (you can make edits in the middle instead of making a brand new card or tape each time), but does not change the fact that the NC mill, lathe, etc. still only accepts the magnetic tape or punch cards as the source of its instructions. This is different from a CNC machine that has a computer inside it that executes a program stored on storage media (which could be magnetic tape, but nowadays a magnetic disk, hard-drive, or flash-drive).
Some NC machines did use G-code but there were other alternatives as well.