Genuine question - how does the Samsung Galaxy S4 eraser shot really work?

At the risk of being called stupid, how the technique called as "Eraser Shot" by Samsung in their Galaxy S4 ad work?

I'm ignorant on photography and related editing tools but question is how the camera or the software compensates the missing areas not captured by the camera?

Is it capturing a sequence of images for something like 5-10 seconds before the shot was taken and then compare and remove changes?

Maybe photography club is the forum to ask this question but let me leave it here for now unless some mod doesn't agree.