It is really straightforward to create local mailboxes in Mac Mail. You may want to do this to archive messages to your computer, or to create a backup.
First, in mac mail click the + icon in the bottom left of the screen
Now, choose New Mailbox
Then on the popup, choose On My Mac from the drop down
Then enter the mailbox name, and click OK
The mailbox will now appear on the left hand side of your mac mail pane.