It helps to know the action of various gates on the computational basis states. For example, the S gate

$$
S = \begin{pmatrix}
1 & 0 \\
0 & i
\end{pmatrix}
$$

keeps $|0\rangle$ fixed while phasing $|1\rangle$ by $i$. This means that if we had the state $|0\rangle+|1\rangle$ then $S(|0\rangle+|1\rangle)$ is $|0\rangle+ i|1\rangle$, i.e. the state we need. We can obtain $|0\rangle+|1\rangle$ by applying Hadamard

$$
H = \frac{1}{\sqrt{2}}\begin{pmatrix}
1 & 1 \\
1 & -1
\end{pmatrix}
$$

to the $|0\rangle$ state.

In summary, you can apply Hadamard and the S gate to the $|0\rangle$ state

$$
SH|0\rangle = S\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) = \frac{1}{\sqrt{2}}(S|0\rangle + S|1\rangle) = \frac{1}{\sqrt{2}}(|0\rangle + i|1\rangle)\tag1
$$

where we included normalization factors.

Note that $(1)$ is not the only way to obtain $|0\rangle + i|1\rangle$. For example, the $\frac{\pi}{2}$ Y rotation

$$
R_y\left(\frac{\pi}{2}\right) = \frac{1}{\sqrt{2}}\begin{pmatrix}
1 & -1 \\
1 & 1
\end{pmatrix}
$$

can be used in place of the Hadamard. This is useful on hardware platforms that may not implement Hadamard natively.

Okay, I'm not sure how you can apply S to a superposition like H|0> though. Since S is a 2x2 matrix, I;m not sure how to write 1/sqrt(2)(|0>+|1>) so that you can apply S to it – Natasha – 2021-01-18T16:34:18.493

1As you can see in the other responses, S can be applied to a superposed state, it will just apply to |0> and |1> easy thanks to the linearity of the operations in quantum computation ;) – Lena – 2021-01-18T16:50:51.437