A function is like a magical machine that does the same job over and over again. Imagine you have a special box, and every time you put a toy inside, it wraps it up with colorful paper. No matter what toy you put in, the box always wraps it nicely. This is what a function does: it takes something in, does a special job, and gives you something back.
Think of a function as a recipe for making cookies. You have a list of steps to follow. First, you mix the flour, then add sugar, and finally, bake it. When you follow the recipe, you always get yummy cookies. A function works the same way. You give it some ingredients (like numbers or words), it follows the steps inside, and gives you the result.
Another way to see a function is like a magic spell. When you say the magic words, something amazing happens, like turning on a light. Functions are like those magic words; you use them to make computers do cool things. They help tell the computer exactly what to do, like drawing a picture or playing a sound.