It derives from the Latin, fac totum to do or to make everything. According to Michael Quinion* "when the word first appeared, it was always paired with another to make what looked like a personal name. Dominus Factotum was a ruler with absolute powers, Magister Factotum was a master of all".
Gradually the word seems to have gone down in stature, and now when we speak of a 'general factotum, we are usually referring to someone who is obliged to perform a variety of lowly or menial tasks.
*Thanks to Michael Quinion of WORLD WIDE WORDSWorld Wide Words is copyright (c) Michael Quinion 2009. All rights reserved. The Words Web site is at http://www.worldwidewords.org