First, I'll show that if $S$ is compact then $S_r$ is actually equal to the set
$$
F = \{ x\in \Bbb R^n : \text{dist}(x,S) \le r\},
$$
where $\text{dist}(x,S):= \inf_{y\in S} d(x,y)$.
It is clear that $S_r \subset F$. As for the converse, we consider an arbitrary $x\in F$. Let $\text{dist}(x,S)=d \le r$, we can find a sequence $y_n\in S$ such that
$$
\lim_{n\to\infty} d(x,y_n) = d.
$$
By compactness, we can find a subsequence that converges to a point $y\in S$. This point satisfies $d(x,y)=d$, hence $x\in \overline B_r(y)\subset S_r$. This shows that $F\subset S_r$ and we conclude that $S_r = F$.
It is well-known that the function $\text{dist}(\cdot,S):\Bbb R^n\to[0,\infty)$ is a continuous function. Since $F$ is the inverse image of $[0,r]$, which is a closed set, under the mapping $\text{dist}(\cdot,S)^{-1}$, $F$ is a closed set.