How does investing in 501c3s Work?

How does investing in nonprofits work?