This is actually a very simple process when you have a rectangular or circular "cut out."
My camera was a Canon 10D mounted on a tripod and set to manual exposure and focus. I first took an image of my daughter holding the picture frame. Then I took an image without her in the frame. Using Photoshop I selected everything that was outside of the frame (in her image) and deleted it causing that part of the image to be transparent. I then, using layers, placed this edited image directly on top of the image that didn't contain her and viola!
Since the camera was on a tripod there aren't any alignment issues so the two images fit seamlessly. It doesn't work well on windy days because things behind the subject move and you end up with blurring or "ghosts."
Copyrighted Image. DO NOT DOWNLOAD, copy, reproduce, or use in any way without written permission from this artist.