I was working through Griffiths' Introduction to Quantum Mechanics, specifically the part about the 1D infinite square well potential (situated between $x = 0$ and $x = a$). To my understanding, this allows for multiple wave functions, each associated with a discrete level of energy:
$$\Psi_n(x, t) = \sqrt{\frac{2}{a}}\sin\left(\frac{n\pi}{a}x\right)\,e^{-i\frac{E_n}{\hbar}t}$$
where:
$$E_n = \frac{n^2\pi^2\hbar^2}{2a^2m}.$$
This is where it starts to get confusing to me. Does this mean that only one of these wave functions describes the particle state? Or is it that a general solution can be obtained by combining all the above possible wave functions to get the following one:
$$\Psi(x, t) = \sqrt{\frac{2}{a}}\sum_{n=1}^{+\infty}C_n\, \sin\left(\frac{n\pi}{a}x\right)\,e^{-i\frac{E_n}{\hbar}t}$$
This is how the textbook says the general solution is determined, but what's confusing me, in this case, are the $C_n$'s (the equation was taken directly from the book). How did they get here, even though they were not present in the first equations? And how are we to determine them?