The most correct * answer is to use the Viewport settings for one, and the Compositor for the other.
In the 3D Viewport press n to open the settings panel. Find the Background Image section, and add an image. You can specify which view you want the image to show up in, including "Camera." That image will be visible in the Viewport.
As for the render, adding a plane can get the job done, but it causes problems that you have to account for. Not the least of which is going out of your way to solve shading issues.
You only need 4 nodes in the Compositor to do this:
- Render Layer (added by default)
- Composite (added by default)
- Alpha Over
- Image
Nodes
When you open the compositor, there should already be a RenderLayer node connected to a Composite node. Press shift-a and add an Alpha Over node. Drop it on the noodle between the two existing nodes and it should automatically hook up. Do the same thing again, but add an Image node.
Settings
The RenderLayer noodle should go into the bottom slot on the Alpha Over. The Image node should noodle (yes, noodle is a verb) into the top slot. Use the Open button on the Image node to load in the image you want to put behind the render. You might have to turn on "Premultiply" in the Alpha Over node. I always forget which way that needs to go. Lastly, make sure that "Transparent" is ON in the Film section of your Render settings.
* most correct - The method that uses the tools that were designed to solve the given problem and creates the fewest new problems.