Example 5 Let $x$ be a real number. Then
$$
|x-1|+|x+1|+|x+5|
$$

the minimum value is $\qquad$ (s)
Let $y=|x-1|+|x+1|+|x+5|$. When $x<-5$,
$$
y=1-x-x-1-x-5=-3 x-5 \text{; }
$$

When $-5 \leqslant x<-1$,
$$
y=1-x-x-1+x+5=-x+5 \text{; }
$$

When $-1 \leqslant x<1$,
$$
y=1-x+x+1+x+5=x+7 \text{; }
$$

When $x \geqslant 1$,
$$
y=x-1+x+1+x+5=3 x+5 \text{. }
$$

By the properties of linear functions, we know that when $x=-1$, $y_{\text {min }}=6$.