ClearAll["Global`*"]
forig[x_]=If[x<0,1,0]; (* we'll only use -π < x < +π *)
terms =6; range=1*π; (* the plus/minus limits for the plot... *)
f[x_]=(1/2)-(2/π)(∑_(m=1)^terms)((Sin[(2 m - 1)x])/(2 m - 1));
plot1=Plot[forig[x],{x,-range,range},PlotRange->{-0.25,1.25},PlotStyle->Directive[RGBColor[1,0,0],AbsoluteThickness[3]],Exclusions->None];
plot2=Plot[f[x],{x,-range,range},PlotStyle->Directive[RGBColor[0,0,1],AbsoluteThickness[2]]];
Show[plot1,plot2,ImageSize->{677,228},AspectRatio->Full]