A background plate, still or moving, is shot first and is thrown on a screen behind the live action. Both are then photographed together creating the illusion of simultaneous occurrence of both events.
In Front Projection the image or footage is projected from in front of the screen and the live actors. The screen is made of a highly reflective material so that the image is reflected only off the screen and not the actors.
In Rear Projection the plate is projected onto the back of a translucent screen. The plate is loaded into a projector and the film is flopped. So when seen from in front of the screen the action is right. The projector needs to be really bright in order to match the foreground lighting. The advantage of rear projection over front is the elimination of any possible reflections off of the actors.
Here is an example of Rear projection of New York city streets giving the illusion of car movement :
Projection is sometimes better than other post techniques like matting etc because, since the background and the action are shot together, the mismatch of mattes creating ghostly borders can be avoided.