This takes some template editing. First step is to setup the CSS and html for a simple drop down menu and get that functioning well.
You could start with this code:
http://code-tricks.com/simple-css-drop-down-menu/
Then you need to format the categories template code to work with your menu.
What skin are you using? Are you working with X-cart 4.2.X like it says in your signature?
I'd start something like this on your dev store, get the css and example menu going, then start work on including the flyout menu foreach loops.