The upper, right-hand graph represents a function. Why? Because there is never more than one value of y for any given x.
If you use the vertical line test on the other 3 problems, you'll see that for some x, the line goes thru more than just one black dot.