Evaluate a sum, in this case of i^2, between two numeric bounds, in this case i=1 and i=4:

Sum[ i^2, {i,1,4} ]

Evaluate a sum (once again of i^2) with a variable upper bound, getting an expression instead of a number:

Sum[ i^2, {i,1,n}]