Minecraft wiki entry for Automatic_smelting, associated text: Step 1: Place down a chest on the ground. (This will be the chest in which the smelted/cooked items will be put)
Step 2: Attach a hopper to the chest.
Step 3: Place the furnace on top of the hopper.
Step 4: Place one hopper on the top and 1 hopper on the side (left, right, front, or back) of the furnace. (The top one will insert the items into the furnace, which get smelted / cooked; The hopper on any side-face inputs burnable fuels into the furnace)
Step 5: Place a chest on top of each hopper attached to the furnace.