You need to have dual outputs from your graphics card. Some have dual DVI (digital) out and some have one DVI and one VGA - but you can convert the DVI signal to analogue so that you have dual analague out. The type of output that you require depends on the monitors that you have.
Newer NVidia cards (and ATI as well I'm sure) have software that allows you to configure multiple monitors. An image can stretch across both - or you can run different apps in either one and switch between using the mouse.
They key is the graphics card.
You can also do something similar if you have an onboard graphics chip and another video card, but onboard graphics can be a little limited