A reference is another name for an existing variable. A parameter declared double& balance refers to the caller's variable itself, so assigning to it changes theirs, like a pointer without * and & at every use. Unlike a pointer, a reference is never null and always refers to the same variable.
Passing by const reference, const std::vector<double>& prices, gives the function read access with no copy, which matters for big vectors and strings. Passing by value makes a copy the function can change without affecting the caller.
The rule of thumb: small values such as int and double by value, large objects you only read by const reference, and objects you must change by reference. Never return a reference to a local variable: it is destroyed when the function returns.