Think of a function as a small machine with a name. def double(n): return n * 2 builds a machine called double that takes a number in and sends twice that number out. Writing the definition does not run it, just as buying a blender does not make a smoothie. The machine runs only when a line calls it: double(7) sends 7 in, the body works out 7 * 2, and 14 comes back to the spot where the call was written.
A call can go anywhere a value can. y = double(5) + 1 runs double first, gets 10, then adds 1, so y is 11. double(double(3)) runs the inner call first, giving 6, then doubles that, giving 12. After each call finishes, the program carries on from exactly where it left off.
A function is not the same as an algorithm, though it usually contains one. The algorithm is the method, such as the steps for finding the largest number in a list; the function is that method packaged under a name, with inputs and an output, so it can be reused. Printing is also not the same as returning: a function that prints its answer shows it on the screen, but the calling code receives nothing it can store or add to.
Think of it like this. A function is like a recipe card filed under a name. Writing the card cooks nothing; cooking happens only when someone pulls the card out and follows it (the call), using today's ingredients (the arguments), and hands over the finished dish (the return value). The same card works every day, with different ingredients each time.
Core idea. Write once, use many times. Functions take input (parameters) and give output (return value).