The alias command creates a command shortcut - typing 'dir' substitutes 'ls'. When you enter 'dir' at the shell prompt, the shell expands it to 'ls' and executes the ls command, listing directory contents exactly as if you had typed 'ls' directly with any arguments.