Example 8 If $a<b<c$, find the minimum value of the function
$$
y=|x-a|+|x-b|+|x-c|
$$

(1985, Shanghai Mathematics Competition)
Solution: In the right figure, $a$, $b$, and $c$ are three numbers on the $x$-axis. The problem is reduced to finding a point on the number line such that the sum of its distances to points $a$, $b$, and $c$ is minimized. It is easy to see that when the point $x=b$, the sum of its distances to points $a$, $b$, and $c$ is the smallest. Therefore, when $x=b$, $y$ has its minimum value.
$$
y_{\text {min }}=c-a(c>a) .
$$