Key to this is composing a shot with a foreground object prominent in the frame and off to one side, so you don't have to mask out the entire object, just one side. The effect can be intensified by adding some scaling to the background image, but that's not absolutely necessary to achieve the sense of 3D. Also, a subtle movement is all that's really required---less is more in this case.