That depends.
For IMAP the mail is stored on the mail server. No need to backup anything there.
Your local mail resources (“KMail Folders” or “Local Folders”) should use ~/local/share/local-mail by default, but this can be configured.
Just enter KMail’s settings->Accounts->Receiving. Select each of your mail resources and click on Edit. You should see the path where it stores mails then.
The resource configuration is in ~/.kde4/share/config/, like any KDE configuration.
How to backup the Email ?
Those are just text files (one file per mail, or one file for all mails if you use mbox). Back it up like any other files.
How to restore from backup with a new user?
Copy back the mails and the configuration (or configure the resources fresh). And it should just work. Maybe you would have to synchronize the folders manually though or adapt the paths in the resources’ configuration if they include the username.
Then there’s also the pimsettingsexporter (“Tools” menu, “Export KMail settings”; or just run it in Konsole) to backup/restore all of Akonadi’s configuration. This should include everything KDEPIM-related.
I never used this (as it is quite new), but this seems to be the easiest way to migrate your KDEPIM stuff to a new installation.
Is this somewhere documented ? (as I could not find it)