You can do both, and it's not a bad idea to (assuming a Roth is right for you).
A Backdoor Roth Contribution is a workaround if your income is over the IRS limit for direct Roth IRA contributions. Instead, you contribute money into your IRA, and convert it to Roth IRA. This has no tax consequences (unless your IRA wasn't empty to begin with; then it gets complicated), so it is effectively a Roth IRA contribution in two steps.
Note that there is still the annual limit for all your contributions, but anyone with income can do it.
A Mega-Backdoor Roth Contribution works through your 401k - you contribute post-tax income directly from your paycheck into your 401k (the limit is 57000 per year), and then roll it over into your Roth IRA. This rolling might not be possible right away, depending on your company's 401k rules, but once you leave the company, you can do it, and ir doesn't 'turn bad' inside the 401k, so you are not in a hurry.
There are many small details, and Books have been written about them - but these are the core ideas. If you plan to do either or both, read up on the details!