The U.S. political system is a two-party political system. Other countries with parliamentary systems have minority, specialized parties. The prime minister has the job of assembling a ruling coalition of several parties, and sometimes the small parties have disproportionate power in making a majority. The specialized small parties, like the Green Party or the Libertarian Party, can assemble a group of interested people and apply that group directly to the legislative assembly.
In the U.S., minority parties are pretty powerless, because the winning majority party can control much of the legislative or executive branches of government. There are lots of special interest groups, but they have to go to the leadership of one of the parties and get the party to endorse their issue. So all the people who are passionately interested in women's issues or in climate change can't directly appeal to a legislator in a special party. They can join a nonprofit group, and that group sends many reminders to vote or to attend protests. But those passionate people may end up feeling like their votes don't count, unless something brings their issue to the top of the priority list of one of the two parties.
So Democrats and Republicans fight, one on one. But what they fight about changes from year to year, issue to issue, depending on what gets "traction" or attention and gets people to show up to vote. Democrats are generally called liberal and Republicans are conservative, but what does that mean?
Paul Rosenberg wrote an article, "Did Trump destroy the conservative movement? No--he cashed in on its darkest tendencies," in Salon.com, on Oct. 28, 2018. A point of Rosenberg's article is that definitions of what is liberal and what is conservative keeps changing over time, and each party has a mix of both, to the extent that we can even tell which is which. Policies change for each election, and even the definitions of liberal and conservative vary.
According to Rosenberg, a main difference between the parties is really psychological. Conservatives tend to be worried about dangers and fearful about the future. They expect that they will have to handle the danger by themselves. In some cases, those dangers may come from other people who can't be trusted or relied on. As a result, they want freedom to do what they need to without restrictions. If they feel threatened and want to buy lots of guns, they want to be able to. So they focus on certain rights.
Liberals, on the other hand, tend to be empathic and more aware about other people's problems. They also can see dangers, but think they will be threatened by problems that already affect other people. They are more inclined to cooperate with others to solve common problems. So if they see that lots of people are getting shot, their response is to control access to guns, not to get more guns for themselves to shoot the "bad guys."
These are general individual psychological methods that people tend to use. The methods are expanded to view the state of society. So people tend to join the party that represents their way of thinking. The approach can apply to many situations and aren't restricted to particular issues. So if people see a social problem that gets on the national party's agenda, the individuals gravitate to a solution that is agreeable to their way of thinking.
This can lead to policies that look contradictory on a rational, ideological basis. Republicans are in favor of gun rights so they can shoot people in self defense. They favor capital punishment to kill the worst criminals. But they are opposed to abortion rights, arguing that unborn fetuses are innocent and don't deserve to be killed.
Democrats, on the other hand, empathize with adults, concluding that no adult deserves to die regardless of their threat or crime. So criminals shouldn't be shot or executed. Unborn fetuses may seem innocent, but they require years of support by willing parents, and the unwillingness of the adult mother can outweigh the right of an fetus that can't survive on its own.
As Rosenberg pointed out, it's easy to find examples of times when parties changed their priority issues. Republican were for civil rights and Democrats were opposed, until suddenly under President Johnson they reversed. Republican Richard Nixon started the Environmental Protection Agency to protect the environment, until Republicans Ronald Reagan and the Bushes opposed it and Democrats Bill Clinton and Al Gore supported it. Republican Eisenhower was fiscally conservative and promoted a balanced budget, opposing Democrat Franklin Roosevelt's deficit spending, until Republicans Reagan and G. W. Bush generated larger budget deficits than any of their predecessors because of tax cuts. Trump has carried on this tradition with a huge tax cut.
Occasionally, a politician will even try to be on both sides of an issue. For example, a few Republicans are trying to claim to be in favor of the Obamacare mandate that insurance must allow preexisting medical conditions while at the same time suing to eliminate the mandate.
It is a common complaint among American voters that both parties are for rich people, and there isn't really much difference. Of course, when Republican get a president like Donald Trump, the character of the party can change based only on the whims of the leader, and ideology goes by the wayside.
Ideology based on reason or a liberal/conservative dichotomy is not necessarily the foundation of the parties, and it is pointless to expect consistency. The pragmatic problem of assembling an enthusiastic coalition of people and winning elections is the basic requirement.
In a larger picture, politics is about assembling a coalition of people with related self-interest to form a cooperating voting majority. This was the purpose of political parties as they arose under Jefferson, Adams, and Madison. It is done when party leaders find particular biases, fears, and hopes that can be used by politicians to unite a majority of people into supporting them. This effort has to be done interactively, so that one year people care about deficit spending, and they next they are more interested in tax cuts.