It is going to depend on whether your email account is POP3, IMAP, or Exchange based. If it is POP3, then all you can have are local folders on your computers and devices.
Both IMAP and Exchange can host their folders on a server, and the clinet (Mac or iPad) syncs those folders.
On the Mac, go into the user accounts, select the account, and choose the mailbox behavior tab. Change each mailbox type (Inbox, Drafts, Trash, Sent, etc.) so that it is pointed as a server folder instead of a local folder. In the mail client itself, you should be able to drag or move emails from the old, local folder to the new server folder (if needed).
My iMac is taking it's sweet time booting, so description the are from memory, and may not be exact. You might have to create a folder on the server, but chances are there is already an appropriate folder to use. (Junk and Spam folders should be considered interchangeable).
On the iPad go to the Account's advanced settings. Again you will find mailbox behaviors. Change them to the same server folders as you did for the Mac.
Once both the computer and iPad (and any other devices you own) are pointed at the same folders they should stay in sync.
The screenshots shown are from an iCloud account. Different folder options may be available for different account types.
If that's not enough detail to find what you need, say so and I can provide more detailed step-by-step instructions.