A recipe card lists the ingredients and steps for pancakes once. Whenever you want pancakes you follow the card, and for a bigger batch you change the amounts, not the steps. A function is that card for a program. def to_fahrenheit(c): return c * 9 / 5 + 32 writes the steps once. to_fahrenheit(100) runs them with c = 100 and gives 212.0; to_fahrenheit(0) gives 32.0. The name c on the card is the parameter; 100 and 0 are the arguments handed over at each call.
Writing the card does not cook anything. The def lines only store the function under its name, and nothing happens until a line calls it with parentheses. When a call happens, the program jumps into the function, fills the parameters with the arguments, runs the body, and jumps back to the calling line carrying the return value.
Not every repeated piece of code needs a function. A loop is the tool when the same steps repeat many times in a row in one place, such as printing 10 lines. A function is the tool when the same steps are needed in different places or with different inputs, such as converting a temperature on the weather screen and again on the settings screen. Often you use both: a loop that calls a function on each item.
Think of it like this. A vending machine with a name on the front works like a function. You press a button with your choice (the argument), the same machinery inside does the work every time, and an item drops out (the return value); you never need to see inside to use it. The comparison stops at functions that only do a job, such as drawing a shape, and hand back nothing useful.
Core idea. Functions break programs into manageable pieces, enable reuse, and reduce repetition.