In the definition of the compound Poisson process, there is an underlying assumption that, as hinted by @Xian, the random variables $X_{i}$'s are *i.i.d.* as well as independent of $N(t)$. To compute $E[S(t)]$, consider
\begin{eqnarray*}
% \nonumber to remove numbering (before each equation)
E\left[S(t)|N(t)=n\right] &=& E\left[X_{1}+X_{2}+\cdots +X_{N(t)}|N(t)=n\right] \\
&=& E\left[X_{1}+X_{2}+\cdots +X_{n}\right]\\
&=& n E[X], \quad\quad\mbox{ since $X_{i}'s$ are iid RV's}
\end{eqnarray*}
Multiplying on both sides by $P\left\{N(t)=n\right\}$ and taking summation over all possible values of $n$, we get,
\begin{eqnarray*}
E\left[S(t)\right] &=& \sum_{n}\underbrace{E\left(S(t)|N(t)=n\right)}_{n\cdot E[X]} P\left\{N(t)=n\right\}\\
&=& \sum_{n} n\cdot E[X]\cdot P\left\{N=n\right\}\\
&=&E(X)\cdot \sum_{n}n\cdot P\left\{N=n\right\}\\
E\left[S(t)\right] &=& E[X]\cdot E[N(t)] = (\lambda t) \cdot E[X]
\end{eqnarray*}
since $\{N(t), t\geq 0\}$ is Poisson process, $E[N(t)] = \lambda t$.

In order to find an expression for $Var[S(t)]$, first find the second conditional moment of $S(t)$.
\begin{eqnarray*}
E(S(t)^{2}|N(t)=n) &=& E[(X_{1}+X_{2}+\cdots +X_{N(t)})^{2}|N(t)=n] \\
&=& E[(X_{1}+X_{2}+\cdots +X_{n})^{2}]\\
&=& E\left\{\sum_{i=1}^{n}X_{i}^{2}+2\sum_{i<j}X_{i}X_{j}\right\}\\
&=& \sum_{i=1}^{n}E\left(X_{i}^{2}\right) + 2 \sum_{i<j} E\left(X_{i}\right)E\left(X_{j}\right)\\
&=& n\cdot E\left(X^{2}\right) + 2\cdot \frac{n(n-1)}{2}E\left(X\right)E\left(X\right)\\
&=& n\cdot E\left(X^{2}\right) + n(n-1)\left(E(X)\right)^{2}\\
&=& n[E(X^{2})-(E(X))^{2}] + n^{2}(E(X))^{2}\\
E(S(t)^{2}|N(t)=n) &=& n Var(X) + n^{2}(E(X))^{2}
\end{eqnarray*}
Now
\begin{eqnarray*}
Var(S(t)) &=& E(S(t)^{2}) - \left[E(S(t))\right]^{2} \\
&=& \sum_{n}E(S(t)^{2}|N(t)=n)P\{N(t)=n\}-[E(X)E(N(t))]^{2}\\
&=&\sum_{n}\left[nVar\left(X\right)+n^{2}\left(E\left(X\right)\right)^{2}\right] P\left\{N(t)=n\right\} -\left[E(X)E(N(t))\right]^{2}\\
&=& Var(X) \sum_{n}nP\left\{N(t)=n\right\} + \left(E\left(X\right)\right)^{2}\sum_{n}n^{2}P\left\{N(t)=n\right\} - \left[E(X)E(N(t))\right]^{2}\\
&=&E(N(t))Var(X) + \left(E\left(X\right)\right)^{2} \left[E(N(t)^{2})-(E(N(t)))^{2}\right]\\
& = & E[N(t)\cdot Var[X] + Var[N(t)]\cdot (E[X])^{2}\nonumber\\
& =& \lambda t\cdot Var[X] + \lambda t\cdot (E[X])^{2}\nonumber\\
&=& \lambda t\cdot [Var[X] + (E[X])^{2}]\nonumber\\
Var[S(t)]&=& \lambda t\cdot E[X^{2}]
\end{eqnarray*}