A function is a block of code that only runs when it is called. You can pass data (arguments) into a function, and it can return data as well.