Domain is the set of all inputs (x-axis)
Range is the set of all outputs (y-axis)
For something to be a function it has to pass the “vertical line test”. If you can put vertical lines throughout the entire graph and the lines are only intersected once (per line) then it’s a function.
For this particular one, it is not a function because it fails the vertical line test.
How?
If I were to put a vertical line through -2 on the y-axis then both points (2,-2) and (6,-2) would be on said line. Therefore it’s NOT a function.