Vertical line test 
A vertical line crossing the x-axis at a point $a$ will meet the set in exactly one point $(a, b)$ if $f(a)$ is defined, and $f(a) = b$.

If the vertical line meets the set of points in two points then $f(a)$ is undefined? 

One definition of a function is  Formal Dirichlet-Bourbaki definition. This defines a function $f: X\to Y$ to be any subset $S$ of the set $X\times Y$ satisfying that if $(x,y)\in S$ and $(x,y')\in S$, then $y = y'$.
In more vague terms: a function is a rule $f$ that assigns to each element of the domain $X$ exactly one element $y$ in the range. We write $y = f(x)$. So that means that if $x_1 = x_2$, then you will necessarily have $f(x_1) = f(x_2)$.
Now if we are talking about functions from (subsets of) the real numbers to the real numbers, then we have a graph. If in independent variable ($x$) is our horizontal axis and the dependent variable ($y$) our vertical axis, then we can talk about the vertical line test. The graph is then $\{(x,f(x))\mid x\in X\}$. If a vertical line intersects the graph in two points, then we have one value of $x$ corresponding to two distinct values of $y$. That is we have $f(x) = y_1$ and $f(x) = y_2$ say.
