It is really going to depend upon the background... The film industry use green screen (or historically
bluescreen) to
matte actors out of one environment and into another.
If your background is complex and non uniform then you will need to do the process by hand.
If your background is simple and uniform in colour then you will be able to automate to a greater or lesser degree.
There are many tools that will help you, but the reason that there are so many is because this is a nontrivial task, and different scenarios require different solutions.
Here are a few starters...
Most of matting will be done in an application like Photoshop as these are raster / pixel based techniques that rely on differences in hue / brightness to detect edges. Occasionally there is no choice but to cutout mattes by hand, in which case a vector solution can be used (perhaps with a tool such as Xara Xtreme).
Photoshop has many tools that help automate the matte proceedure - the
Magic Wand Tool is particularly quick, and works well in simple cases.