nmax = 100;
f[x_] := 1/(1 - x);
Sf[x_] := Sum[x^k, {k, 0, n}];
Do[
        Print["n=", 
          n]; 
Plot[{f[x], Sf[x]}, {x, -2, 2}, 
          PlotRange -> {-10, 10}]
, {n, 0, 
          nmax}];