Corollary: If $X$ is a set of $n$ points in $\mathbb P^r$, then the regularity of $S_X$ is the smallest integer $d$ such that the space of forms vanishing on the points $X$ has codimension $n$ in the space of forms of degree $d$.
Following are the two steps which I do not understand:
$1$. The ring $S_X$ has depth at least $1$ because it is reduced, so $H^0_{\mathfrak m}(S_X)=0$.
$2.$ Since $X$ is just a finite set of points, it is isomorphic to an affine variety and every line bundle on $X$ is trivial.
Please explain me the above $2$ points!
If $\operatorname{depth}S_X=0$ then $\mathfrak m\in\operatorname{Ass}S_X$. It follows $\mathfrak m=\operatorname{Ann}s$ for some non-zero $s\in S_X$ homogeneous, so $s\in\mathfrak m$. Then $s^2=0$, and since $S_X$ is reduced $s=0$, a contradiction.
It is well known (see Theorem 3.5.7 from Bruns and Herzog) that $H^i_{\mathfrak m}(S_X)=0$ for all $i<\operatorname{depth}S_X$. In particular, $H^0_{\mathfrak m}(S_X)=0$.
Let $X=\{p_1,\dots,p_n\}$, and $q\in\mathbb P^r\setminus X$. For each $i$ pick a vector $t_i$ such that $t_i\perp p_i$, and $t_i\not\perp q.$ Now define a linear polynomial $f_{i,q}(x)=\langle t_i,x\rangle$, and set $f_q=\prod_{i=1}^nf_{i,q}$. Notice that $X$ is the zero set of the family $(f_q)_{q\in\mathbb P^r\setminus X}$. (See also Finite subset of projective $n$ space is a variety.)
A line bundle on $X$ is a locally free $S_X$-module of rank one. Then its depth can't be zero, and since $S_X$ is Cohen-Macaulay of dimension one, from Auslander-Buchsbaum formula we get that its projective dimension is zero, so the line bundle is trivial.