u[x_,t_] = (80/Pi)*Sum[(1/(2*m-1))*Exp[((-(2*m-1)*Pi^2)/2500)*t]*Sin[(((2*m-1)*Pi*x)/50)],{m,1,Infinity}];

u0[x_,t_,M_] = (80/Pi)*Sum[(1/(2*m-1))*Exp[((-(2*m-1)*Pi^2)/2500)*t]*Sin[(((2*m-1)*Pi*x)/50)],{m,1,M}];

Manipulate[
Plot[u[x,t],{x,0,50},PlotRange->{{0,50},{0,25}}],
{t,0,300,Appearance->"Labeled"}]

Plot3D[u[x,t],{x,0,50},{t,0,300},AxesLabel->Automatic]

Manipulate[
Plot3D[u0[x,t,M],{x,0,50},{t,0,300},AxesLabel->Automatic],
{M,1,50,1,Appearance->"Labeled"}]

Plot3D[u0[x,t,20],{x,0,50},{t,0,250},AxesLabel->Automatic];