To have a function, we cannot have repeated x values. Put another way, we can't have any input go to more than one output. Choices A through C are not functions because....
Choice A has x = 10 go to more than one y output.
Choice B has x = 2 go to more than one y output.
Choice C has x = 4 go to multiple y outputs.
Only choice D has each x value listed one time. We don't have any repeated x values. Any x input leads to exactly one y output. This is why choice D is a function.