The rule of a function is that every input has one output.
What that means is that for every x value, there is only one y value.
You can test this with the vertical lines method. If you draw vertical lines through the function, each vertical line should only intersect with the graph at a single point. If it intersects at two, it is not a function.