For a function, each x-value cannot give more than one y-value. For this graph, however, almost all of the x-values give two y-values. For example, consider x=4. For that x-value, y can be both -2 and 2.
Thus, the graph fails the vertical line test, and is not a function.