Any relation is a function if for each x value there is only one potential y value (the reverse does not need to be true). Think of the x values in terms of inputs or the value that one can adjust in a test. The y values are the outputs or results from a particular x value. There cannot be two different results for one input.
The domain is a collection of all x values in the relation and the range is a collection of all y values.