Oh my sweet child.
So say I have the domain example.com and I want to send and receive e-mails over that domain, then I use the MX record to point to a mail server. If I set the MX records to gmail, for example, so:
Whoa there partner, what do you mean by "set the MX records to gmail"? You set your MX records to point to an SMTP server's hostname. That SMTP server can be Google Apps, if you have a paid Google Apps account. Part of Google apps includes Google Mail. However, I don't think you're talking about Google Apps, because of what you say next:
Do I get e-mails sent to [email protected] or can I set a specific username(instead of whatever, e.g: [email protected]) for sending/receiving, and if I do, how do I set that?
MX records are sought out by sending SMTP servers, and all email they want to send to your domain is sent to the host represented by the MX record. So if your email server is smtp.example.com, then all email, regardless of the recipient address, is sent to that host's MTA to get handled.*
How do I receive the e-mails sent to Google's mail server after they are sent, do I set up a Gmail account to where the domain's e-mails get forwarded to, or is there another way to get it, and how?
Heaven help us all. You need to have your own mail server, or pay for a service to receive your mail. Gmail does not come into play unless you purchase a Google Apps account which is not "Gmail", strictly, speaking.
Perhaps it's time you stepped back and researched this topic a little deeper so that you can pose more specific questions and receive more specific answers. You are about to embark on a fantastic journey of knowledge, understanding, personal growth, and intense hurting (but the last one should go without saying since we're discussing email, after all).
*Technically yes an MTA can accept email for a domain and then send it on down to a specific email address. However you still have to run your own MTA and then configure it to forward on to a specific mailbox, such as [email protected].