Which represents a function and why? I'm confused

A function has only one output (y) for every input (x). Easy way to identify a function on a graph is by the vertical line test. Imagine a vertical line going through the function, if the imagined line can go through exactly once, it's a function. (The top one is a function, the bottom is not.)