Angry GM (theangrygm.com) wrote a comprehensive article on the subject here. You'll learn a lot about Open Game License (OGL), System Reference Document (SRD) and other copyright considerations there.
However, be warned that his writing, while full of good advice and wisdom, is liberally sprinkled with rude and vulgar language (I'm borrowing nitsua60's words here).
Basically, you have to choose between two models : limit yourself to the content given in the SRD (with all it's limitations) or sell your work through the Dungeon's Master Guild. Be aware, though, that if your choose the latter, you won't be allowed to distribute it (even for free) anywhere else, and that includes any copy you would want to give as rewards to your contributors.