The mixed effects model can be written as $Y=X\beta+Zu+\epsilon$, where $X$ and $Z$ are matrices of known constants, $\beta$ is an unknown parameter vector, $u$ is a random vector, and $\epsilon$ is a vector of random errors, all of which are appropriately conformable. The elements of $\beta$ are considered to be non-random "fixed effects" and the elements of $u$ are "random effects." $Var(\epsilon)=R$ and $Var(u)=G$. Then the variance of $Y$, $Var(Y)=ZGZ^\prime+R$ as we assume $Cov(\epsilon, u)=0$.
SAS differentiates between "G-side" and "R-side" random effects in your model. G-side effects are random effects that enter through the $G$ matrix above and R-side effects enter through the $R$ matrix above. When you use the repeated statement in proc mixed with a compound symmetric covariance structure as you have specified in your post, you are fitting a marginal model ($G=0$) and placing all the random effects on $R$, which involves the variances and covariances for the error components in $\epsilon$. In this case, you have told SAS that $G=0$ and $R$ is compound symmetric, where each element of $R$ is equal to $\sigma_{ij} = \sigma_1^2+\sigma^2$ for ($i=j$) and $\sigma_{ij} = \sigma_1^2$ for ($i\ne j$). When you use the random intercept statement in proc mixed, you are inducing correlations through both the $G$ and $R$ matrices. In this case you are setting the elements of $G$ to $\sigma_1^2$, and you are setting $R=\sigma^2I$, so that $R$ is the identity matrix with $\sigma^2$ terms on the diagonal.
Therefore, when you use the repeated statement in SAS:
$Var(Y)=ZGZ^\prime+R = 0 + R = 0 + CS = CS$,
where $CS$ is the compound symmetric matrix. When you use the random statement, you get:
$Var(Y)=ZGZ^\prime+R = \sigma_1^2ZZ^\prime + \sigma^2 I = CS$,
since $ZZ^\prime$ is a block diagonal matrix with 1's on the diagonal blocks. As you can see, in either case the end result is the same: a compound symmetric covariance matrix.
I hope this helps. Best of luck!