Answer:
First one is a function, second one is not, since it assigns more than one y value for x values.
Explanation:
A function means for every x value, at most 1 y value exists. This is clearly not the case for the bottom figure. You can test it with an imaginary vertical line. There should be zero or one intersections.