Domain means what values x can take for a function f(x) so that it is defined.
And range of functional value that f(x) can take is the range of a function.
if f(x) = x², then x can take any value. So domain is (-∞,∞)
The values that f(x) can take are all positive numbers and 0. So range is [0,∞)
if f(x) = 1/(1-x)
Here x can take any value except 1. x can't take the value 1 as at x=1, function is not defined. So domain is (-∞,1) U (1,∞).
And f(x) can take any value. So range is (-∞,∞)