I don't know latex well enough to give visuals
First thing we do in long division, how many times does the first term in the denominator go into the first term in the numerator? That is, how many times does x^3 go into x^3? The answer is 1, so bring the 1 up and multiply the denom by that amount and subtract it from the numerator.
They got lazy and stopped there, but this would be your remainder
So that was
---------------------How many times does x^3 go into x^3?
x^3 + x^2 | x^3 + 2x^2 + 3x + 1
1
---------------------
x^3 + x^2 | x^3 + 2x^2 + 3x + 1
Now multiply that 1 by (x^3 + x^2) and subtract
1
---------------------
x^3 + x^2 | x^3 + 2x^2 + 3x + 1
-(x^3 + x^2)
= x^2 + 3x + 1
Seeing as x^3 doesn't go nicely into this next term, we just leave it as the remainder.
So
We could, however, continue to break it up if you'd like: