It actually does work pretty well. It basically detects similar patterns and textures from other parts of the photo, duplicates them and inserts them in the part you deleted. Except it lines up certain, lines and textures so it looks just like a continuation, and like it was always there.
Obviously it's not perfect and you couldn't remove a whole tree or something giant out of a picture.
It works pretty damn good for touch-ups and stuff though. In that video where he removes the branches it works perfect because there really isn't too much "texture" or anything to line up in the sky. It just doesn't work as well if you're deleting something out of a highly detailed area.
I'm still amazed by it though. Haha