The procedure will vary greatly depending on what your email program is.
First you have to understand how the mail program stores your mail. Some programs use proprietary single file solutions, others use a format called "mbox" where you mail is stored in a special directory structure.
Let's take a program like Mozilla Thunderbird, which stores your email in mbox format. If you delete a bunch of messages, thunderbird removes the file associated with the messages from the directory structure. If I wanted to retrieve the files, all I have to do is retrieve the deleted files. This can be accomplished in a number of ways, but the easiest is to use a program like OnTrack Data Recovery. It will scan the hard drive for deleted files, and restore them to a location you specify. Tada, you have mail.
Note that bits and pieces, and probably large chunks of the messages will exist in several other places - most notably the pagefile and temporary program files. These can also be recovered, but it takes a few more tools.
Now let's look at a program like Outlook. Outlook stores messages in a proprietary format, a PST file. When you delete a message, it deletes the pointer to the message in its index... It does not delete the message - it will continue to exist inthe file until overwritten. In this case, I can simply extract the message directly from the file. Their are programs to do this as well.