Scope and the call stack
Each call gets a frame of its own for its local variables, which is gone when the call returns, so two functions can use the same name for different things and a local can't be read from outside.
Each call gets a frame of its own for its local variables, which is gone when the call returns, so two functions can use the same name for different things and a local can't be read from outside.