Feed the rule f(x)=x2 some inputs: −3→9, −1→1, 0→0, 0.5→0.25, 2→4. The outputs pile up at 0 and above, and nothing ever lands below 0. The range is the set of landing spots, here [0,∞), even though the domain was every real number. Range is about what comes out, and it is often smaller than you might first assume.
Two tools find most ranges. First, look for a built-in floor or ceiling: squares and absolute values are never negative, 2x is always positive, sinx stays between −1 and 1. Then shift or stretch that bound: x2+3≥3, −x2≤0, and 5sinx lies in [−5,5]. Second, solve y=f(x) for x: any y that leaves no possible x is missing from the range. That is how you find that x−3x+1 never equals 1.
The range is not the codomain, the set a function is declared to map into. Saying f maps reals to reals allows any real output in principle, but x2 only reaches the non-negative ones. Nor is the range a single peak: the highest output of −x2+4 is 4, yet the range is every number up to 4, written (−∞,4].
Think of it like this. The range is the patch of lawn a sprinkler actually wets. The valve accepts any setting (the domain), but water lands only inside a certain region, and asking 'can it reach the fence?' is asking whether a value is in the range. Unlike a wet patch, a range can have a gap, such as one missing value.
Core idea. The range is every value the function can reach as the input runs over the whole domain.