Think what happens when the number of possible outputs is smaller than the number of possible inputs.
If we have a hash function f(n) that outputs a number between 1-100, but n can be any number between 1-1000, then some inputs must result in collisions.