Picture a function as a sort of machine. We put something into it, and it gives us something out. I didn't say what these things are, they're just things. Now, what we get out depends on 1. What we put in, and 2. How the machine works.
So let's say I have a machine called f. Let's say the object I input is called x. Then the notation we use for the output is f(x).
Now, that doesn't really tell us anything. Ideally, what we want to know is: if I give this function an input, what will the output be?
There are a lot of ways to specify the "rule" for the function, i.e. What the function does to the input in order to make an output. For instance, we could use a graph to show what the output would be. We could also use words, or we could use an algebraic formula.
Suppose we want a function to take our inputs and square them. So our input is x, we'll call our function f, and the output is f(x), and we can describe what the output will look like by saying f(x) = x^2. Or, to put it in words, the output of the function f, when we give it the number x, is equal to the square of x.
Now you see, we need to have this rule that tells us how the function will work. In the above example, the rule is "take your number and square it, and the result is the output."
However, the rule would be useless if one x value could have multiple y values. That would mean that we could put one number into the function and get a result, and then we put the same number in again and get an entirely different result. That doesn't make sense, because the function still has the same rule for transforming the input into the output. How can you put the same input in twice, with the same rule, but get different outputs? You can't. If you could, it wouldn't be a function.