Answer:
Each element in the domain must be mapped to one and only one element in the range. If that condition is satisfied then the mapping (or relationship) is a function.
Different elements in the domain can be mapped to the same element in the range. Some elements in the range may not have any elements from the domain mapped to them. These do not matter for the mapping to be a function. They do matter in terms of the function having an inverse, but that is an entirely different matter.
As an illustration, consider the mapping from the domain [-10, 10] to the range [-10, 100] with the mapping defined by y = x2.