A 501(c) organization is a group that is allowed to claim non-profit and tax-exempt status. Simply put, this allows the group to receive and spend donation without worrying about paying taxes. Many different types of 501(c) groups exist; at the moment there are 28 subcategories: 501(c)(1) through 501(c)(28). They perform hundreds of different functions, including charity, religious work, advocacy, public service, private service, medical research, and technological experimentation.
A 527 organization, while still tax-exempt, is created specifically to advocate for or against a political candidate. 527s do not self-identify with any political party or figure, and so avoid taxation under the Federal Election commission, or the contribution limits places on Political Action Committees. Their function is to raise awareness and inform the public about little-known facts, and influence the eventual election.
The main advantage a 501(c) has over a 527 is that it can be formed for almost any purpose. While a 527 is limited in the ways it can spend money and cannot outright endorse a political figure, a 501(c) is not bound by the same rules in its pursuits. However, many 501(c) organizations cannot engage in political action; 501(c)(3)s are specifically prohibited from such. In contrast, 501(c)(4) and 501(c)(6) organizations are allowed to lobby and advertise in favor of specific political policies and figures.
To reduce the issue to its essentials, remember that a 527 has little other purpose than to advocate politically, while a 501(c) may use its main purpose -- for example, raising awareness about environmental concerns -- to nudge thinking towards their chosen candidate as long as they do not engage in any overt political activity.