Interest groups and political parties form what the important policy theorists Helen M. Ingram and Anne L. Schneider called, in their influential text Policy Design for Democracy, "intermediary groups." They aggregate the opinions and sentiments of large groups of people and then represent those opinions and sentiments to policymakers.
Because these intermediary groups represent more than themselves they are better able to influence the outcome of public policy. According to Schneider and Ingram, the primary motivation of politicians is to seek and achieve reelection. Intermediary groups, representing thousands or millions of voters, can call on their supporters to give or withhold their votes to specific politicians based on their willingness to adopt policies supported by the groups themselves. This is the primary method by which interest groups and political parties influence public policy.
Other methods include cash donations to political campaigns, and the filing of amicus curiae briefs in court cases.
Interest groups and political parties are very different entities. An interest group focuses money, donations and efforts towards achieving a specific policy that achieves its goals or benefits its backers. For example, the National Rifle Association is an interest group that wants to limit gun control laws, and to that end influences policy by making campaign donations towards pro-gun rights political candidates. They also employ full time lobbyists on Capitol Hill and a team of lawyers to challenge what they view as unfair gun laws in the court system.
Political parties, by contrast, are organizations based around a broad philosophy that concentrates money and ground-based operations to elect candidates of similar belief systems. In the United States, the two main political parties, Democrats and Republicans, are so large and well-funded that they essentially prohibit any third parties from entering government positions in large numbers. So their influence on policy is more indirect than interest groups, as politicians must conform to some degree to the wishes of parties in order to win financial and organizational backing in elections.