You don't have the correct material for the domain. You used a diffuse material for the domain, so it's definitely going to be just another box. The cube on the viewport is just in wireframe draw type, which you can find and change in the object settings.
In Blender Render people used Voxel Data for Smoke Simulations to make the domain transparent and to only show the fire or smoke that you're rendering. But in Cycles there's this Attribute node. Now I have no idea why or how it works, but it works so I'm using it. Here's the node setup I'm using.
You can change the color of the fire with the color ramp, and you can change the density of the smoke and the amount of light the fire emits by changing the value on the multiply node.
About the Attribute node, you can find more about it here if you wanna see what else you can do with the smoke simulation: https://docs.blender.org/manual/en/dev/render/cycles/nodes/types/input/attribute.html