If any vertical line intersects a graph at more than one point, the graph is not the graph of a function, otherwise it is certainly that of a function.

If a graph is a function (it passes the vertical line test) and no horizontal line intersects it at more than one point, it is a one-to-one function.