The term "code" was originally used in the sense of an engineering code. It goes back to the early days of the NMRA when it defined, IIRC, four standard profiles, which their great and good decreed would provide all the options any N, HO or O modeller's heart could desire while minimising tooling costs for manufacturers.
Each code was referenced by the rail height in thousandths of an inch of that particular specification. But it turned out that most modellers didn't have the attention span to cope with anything beyond the height, one or two radicals wanted to actually model accurate track or model rail sizes other than those decreed from on high and most manufacturers just carried on doing whatever suited them.
So, in common usage "code" came to just mean rail height. Even the NMRA eventually gave in, went with the flow, and dropped the detailed rail codes from their published standards. Nowadays code just means height in thou and doesn't have all that much to do with arcane concepts like accuracy – given the helicopter views from which most layouts are viewed at exhibitions and the practicalities of turnout construction, things like head and base width are more important, but "code" tells you nothing about them.