cycles node setup for volumetric shader
You have to use the volumetrics input in the material output node, instead of the surface input.



There are three different volume shaders. Volume absorption, volume scatter, and emission (yes, the same node used for making physical lamps).


Volume absorption is for simulating how light seems to vanish, like in smoke or clouds.
Volume scatter is for simulating how light bounces around inside of an object, similar to subsurface scattering.
And emission, when plugged into volume, is useful for rendering objects that emit light and are visible to your camera. This is good for flames and glowing objects that are semi-transparent.



(More info here)