The first step to contributing to MongoDB is probably to think about which project you'd like to contribute to. In addition to the database servers, there are drivers for supporting access to MongoDB from various programming languages, some object-document modeling libraries (ODMs), connectors for spark and hadoop integration, etc. There are also programming languages that lack mongodb drivers entirely. If you have experience with such a language, that would be a pretty independent project, but quite useful.
All that said, supposing you want to contribute to core server development, the first step is probably to practice building MongoDB and running the tests. The wiki on github has some instructions on building,
here, and on running tests
here. As you're practicing this, take notes on places where the docs are incomplete or incorrect, and help us out by submitting a pull request to update the docs. You can post questions here, but I encourage you to do some sleuthing on your own first, to see if you can figure out the problem yourself. Anything that's hard for you to figure out, write down what you learned, because it may be an indication of a way that the build or test system could be improved. Such improvements are themselves very valuable contributions.
From there, the
wiki has some guidelines about contributing, including signing the contributor agreement, picking tickets and projects, etc. Tasks with the label
"neweng" attached are often simple enough to be a good place to practice making contributions. They include things like deleting obsolete interfaces, fixing logging behavior, etc. They're not always intellectually challenging, but that makes them a good way to practice the mechanics of contributing.
I hope that helps!
-Andy