You need it 1 level below with a 1 tile channel on one of the outer edges of the workshop. I always put it on a non-walkable tile.
The best bet is to build a forge room, then from there make stairs down and make a little chamber (size depending upon how many spaces you want to be able to build forges in above) with a tunnel going from where you are all the way to 1 square away from the magma. At 1 square from magma, go back a bit and build a stair all the way to the surface - this is the escape route. Then you can clear out the stone if you want it (if its valuable) or leave it to be melted by the magma. Can also smooth the walls if you want. When you're ready, dig out the stairs that you made down (channel the top, remove the bottom) and send either the fastest dwarf you have (most agile) or the most expendable to dig out the last wall (undesignate the other miners), and also designate another stone to be mined on the surface. He will dig out the stone and immediately try to dig out the one on the surface, which will send him up the stairs.
I've never lost a miner to this (they always immediately run before it comes in), but it is possible I guess. If you want to avoid that, you could find a spot where the lower floor (one you're making the tunnel to) has magma sticking out farther than the upper floor, and use the channel designation to dig the last tile out from 1 tile above instead. That way your miner is completely safe.
You could also build yourself a steel wall grate along the path of the magma, to supposedly keep magma monsters out, but I never do it and I've yet to have the magma monsters come through my long tunnel, they stay in their pit. Plus if a monster wanted in couldn't it just bust the grate? Your choice here.
[ November 08, 2007: Message edited by: Paul ]