A graph is only a function when there is only one y value for each x value.
A trick is to draw a line through some points on the x-axis, and if the line goes through more than one point. Then it is not a function. (See picture)
Sorry, not all the lines are straight, but you get the point. B is the only one that doesn't have more than one point on the lines I drew.