This article documents exporting a mailbox from OS X Mail to a local file.  With Mail open, select the desired mailbox, then select Export Mailbox... from the Mailbox menu.

In the next window, select the "Export all subfolders" checkbox and the desired location of the file, then click Choose.

The export process will then begin.  The status of the export process can be seen by opening the Activity window from the Window menu.