A function is a named block of code that does one specific task. You've already used functions without knowing it. When you write print("hello"), you're calling a function named print.
Someone wrote that function. You just use it. Now you'll write your own. You give the function a name, tell it what to do, and later you can run that code just by using the name. Write once, use anywhere.