The midterms fall halfway through a president's term in office. They decide who controls the two chambers which make up Congress - the Senate and the House of Representatives.
At present, the Democrat party controls both chambers, but by very slim majorities. And historically, the party that holds the White House has tended to suffer losses in the midterms.
The primaries decide which party's candidates will run against each other in the midterms, and their election will play an important part in determining the rest of US President Joe Biden's presidency.
Five states held primary elections on Tuesday, making it the busiest date on the 2022 midterms calendar so far. Here are some of the projected results:
Pennsylvania: Pro-Trump Republican state legislator Doug Mastriano won the race to become the Republicans' nominated candidate for governor of the state. He has been a vocal supporter of Mr Trump's baseless claim that he won the 2020 presidential election
North Carolina: Congressman Ted Budd - endorsed by Mr Trump - defeated former North Carolina Governor Pat McCrory to become the Republicans' nominee. He will face Democrat Cheri Beasley, the first black woman to serve as chief justice of the North Carolina Supreme Court. The race is expected to be competitive
Idaho: Republican governor Brad Little defeated a challenge by his own Lt Gov Janice McGeachin. The two have been locked in a power struggle as Trump-backed Ms McGeachin issued orders while Mr Little was out of state last year, including barring mask mandates.
Earlier this month, Mr Trump's pick for the Ohio Senate primary cruised to victory against his opponents. But Pennsylvania's primary has gone down to the wire.
Despite Mr Trump's endorsement of Mehmet Oz, the race stayed in a three-way dead heat until polls closed.
The Republican contest was shaken up by a late surge from right-wing commentator Kathy Barnette.
But Mr McCormick came from behind, with the race narrow enough to be in recount territory.
Pennsylvania primary marks test of Trump's strength
By Nomia Iqbal, BBC News
Dr Oz arrived at the venue and did a thumbs up to us and said he was feeling good. Taking to the stage he thanked everyone who supported him and made it clear he wasn't conceding.
He said victory would be his in the end. But his closest rival Dave McCormick - who wasn't backed by Mr Trump - said the same thing.
The results are still being counted but at the moment it's within the margins for a recount. The full count of the actual ballots could take days.
It feels a lot like 2020 when we were here for the presidential race. In the end Pennsylvania projected for Biden taking him over the threshold.
Tonight was a critical test of the former President Trump's ability to back winners… He wants to use the Primaries to prove his dominance over the Republican Party.
Mr Trump really got behind Dr Oz - whether his base did is yet to be decided.
The eventual Republican winner will take on Lt Gov John Fetterman, who easily won the Democratic Senate nomination on Tuesday night - two days after announcing he had suffered a stroke.
On Monday, the left-wing Democrat's team said he had undergone surgery to implant a pacemaker with a defibrillator.
Mr Fetterman, a Harvard-educated former mayor who sported hoodie sweatshirts instead of suits on the campaign trail, remained in hospital on the night of his election victory, with his wife speaking at a campaign event in his place.
In a White House statement on Tuesday night, Mr Biden congratulated Mr Fetterman and argued that the Republican candidates were "too extreme".
But a controversy that dogged Mr Fetterman in his primary campaign is certain to be raised by Republicans during the general election.
In 2013, during Mr Fetterman's second term as mayor of Braddock, a town of around 2,000 outside Pittsburgh, he pursued an innocent black jogger who he wrongly thought had been firing a gun near his home.
Mr Fetterman, who is a hulking 6ft 8in and was armed with a shotgun during the confrontation, has refused to apologise for the incident.