So here is the actual expansion:
\begin{align} T(n) &= T(n-1) + n \\ &= T(n-2) + (n-1) + n \\ &= T(n-3) + (n-2) + (n-1) + n \\ &\vdots \\ &= T(0) + 1 + 2 + \ldots + (n-2) + (n-1) + n \\ &= T(0) + \frac{n(n+1)}{2} = O(n^2) \end{align}
I do not understand how it is being done. Like how we got second line from the first line. Recurrence is really confusing for me. Hope you can explain it! Thank you!