Functions are block of code that "do something." We have to "call" the function in order for it to be run. We typically write functions when we have something we want to do multiple times, so therefore we write it once and then "call" it when we need it. For example, we might want to find the average of two numbers.
Functions can be passed parameters that can be used within the function, and then return a value to wherever the function was called from.
It's important to keep in mind the scope of the variables you are working with. Variables that are defined within a function are called "local" - they only have value inside that function. Variables outside of a function are called "global."