If you are flashing a brand new rom then you want to do a factory reset in cwr or wipe data in RM. At that point you will need to restore everything! Make sure you have a backup nandroid and a Titanium backup.
However, if you are "flashing over" a current rom with a new version you might not need to get so drastic. Most roms will do a system wipe which will leave your programs intact. (still do a nandroid please) If I do a flash over then I'll go into cwr, advanced, and do a manual system wipe, dalvik and cache wipe, then install the new rom. Don't reboot until you flash the updated rom! To reiterate, the system/wipe is in the advanced menu, it's not the factory/reset option on the main screen.