If $R=K[X]/(X^n)$, can represent any element as polynomial with degree $<n$

Let $K$ be a field and $R=K[X]/(X^n)$ where $n \in \mathbb{Z}_{n\geq1}$ and $(X^n)$ is the ideal generated by $X^n$. We denote $x:=X+(X^n) \in R$, any equivalence class $r$ in $R$ has a representing element of the form: $$r=a_0+a_1X+ \dots + a_{n-1}X^{n-1}.$$

I am confused about the statement in bold. How would I find such an element for $X^3 \in K[X]$ if $n=2$ for example?


By the Division Algorithm $\ f = q\, x^n + r\ $ with $\,\deg r < n,\,$ hence $\,f\equiv r\pmod{\!x^n}$

See this answer for further discussion of such normal forms in quotient of Euclidean domains.

Same for $R[x]/g$ over any commutative ring $R$ and any polynomial $g$ whose leading coeff is a unit (invertible), since this enables division with smaller (degree) remainder (as explained in the links).