Passing an address

When a program passes a variable to a function by reference, that variable's address in memory is passed to the function.

(Maybe it is a copy of the address, but the result is the same in either case.)

Once again, the code in the function can do just about anything that it wants to do with the incoming parameter.

Can modify the original variable

For example, the code in the function can use the address to find and to modify the value stored in the original variable.

(All of the complex address manipulations take place behind the scenes requiring no special effort on the part of the programmer to modify the value stored in the original variable.)