In a nutshell, environment variables are stored as key-value pairs.

See that? The env command brings up all the environment variables of the current Terminal session.

Looking at the HOME variable, HOME is the key and /Users/user is the value.