A function has four parts: return type, name, parameters, and body. Return type says what kind of value it gives back. Name is what you call it. Parameters are inputs. Body is the code.
Example: int add(int a, int b) { return a + b; }. Return type is int. Name is add. Parameters are a and b. Body adds them and returns the result. Return type comes first so the compiler knows what to expect.
Parameters go in parentheses. Body executes when called. This structure never changes.