f[x_,t_,n_]:=Cos[n t] Sin[n x]

Plot[f[x,0,1],{x,0,π}]

Plot[Table[1/n f[x,0,n],{n,1,10,1}] //Evaluate,{x,0,π}]

n=3;
Animate[
Plot[f[x,t,n],{x,0,π},PlotRange->{-1,1}],{t,0,π(1-1/16)(2/n),(2/n)π/16}]

Animate[
Plot[ 1 f[x,t,1]+  1/2 f[x,t,2],{x,0,π},PlotRange->{-2,2}],{t,0,π(1-1/16)(2/n),(2/n)π/16}]

n=3;
m=2;
Animate[
Plot3D[ Cos[(n+m) t] Sin[n x] Sin[m y],{x,0,π},{y,0,π},PlotRange->{-2,2}],{t,0,π(1-1/16)(2/n),(2/n)π/16}]

n=3;
m=2;
Animate[
ContourPlot[ Cos[(n+m) t] Sin[n x] Sin[m y],{x,0,π},{y,0,π},PlotRange->{-2,2}],{t,0,π(1-1/16)(2/n),(2/n)π/16}]