Code functions as a language by representing and creating computational worlds. When writing code, programmers are speaking to computers, which then speak back through the program output. Code uses linguistic structures like variables, values, expressions, and sentences to represent a computational world and direct the computer's operations within that world. Programming involves controlling a new kind of labor by encoding it in a computer language.