Use Sum to set up the classic sum \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 1\), \(\[Infinity]\)]
\*FractionBox[\(1\),
SuperscriptBox[\(n\), \(2\)]]\), with the function to sum over as the first argument. Use the Wolfram Language's usual range notation {variable,minimum,maximum} as the second argument:
Sum[1/n^2, {n, Infinity}]