TaylorPolynom[f_,x_,n_]:=Sum[Derivative[k][f][0]/k!x^k,{k,0,n}]

f[x_]=Sin[x]+Cos[2x]/2

TaylorPolynom[f,x,12]

Manipulate[Plot[Evaluate[{f[x],TaylorPolynom[f,x,n]}],{x,-5,5},PlotRange->{-2,2},PlotStyle->Thick,Epilog->Text[Style["n = "<>ToString[n],24],{-4.25,1.8}]],{n,Range[0,20],ControlType->Slider}]