In a nutshell, the sin() and cos() terms are periodic curves, and the weighting of the various coefficients is what allows proper regression fits. Let’s take a closer look at the formula, and try to make sense of it.
For example, as t goes from 0 to 52, goes from 0 to 1, goes from 0 and 360. (and then it repeats since sin repeats in multiples of and therefore goes from sin(0) to sin(360) which is a full periodic cycle of this function. Note the same logic applies to the cos() term in the formula.
The picture says it all.
Further Reading: Automated Detection of Influenza Epidemics with Hidden Markov Models