My first QSO was 1016 miles. A few days later, trying to contact a friend 122 miles away, we could not hear each other, but another ham 1403 miles away relayed between us.
As stated above, it depends on a number of things.
HF can, under the right conditions, bounce off the ionosphere and allow very long distance communication. Too low a frequency, and the longer wavelengths may be absorbed in the lower layers of the Ionosphere, though shorter wavelengths may penetrate higher and bounce.
VHF/UHF, due to the very short wave lengths are considered "line of sight" but actually will go a little further depending on terrain and height of antenna, other factors. I can easily hit a repeater over 40 miles away on 2 meters with very little power (8-12 watts).
Each frequency band has its own particular propagation characteristics. Read up.