NEW YORK CITY -- Virtually every day of his hush money criminal trial, former U.S. president Donald Trump talks about how he can鈥檛 talk about the case.

A gag order bars Trump from commenting publicly on witnesses, jurors and some others connected to the matter. The New York judge already has found that Trump, the presumptive Republican nominee for president, repeatedly violated the order, fined him US$9,000 and warning that jail could follow if he doesn't comply.

But the order doesn't stop Trump from talking about the allegations against him or commenting on the judge or the elected top prosecutor. And despite a recent Trump remark, it doesn't stop him from testifying in court if he chooses.

As he fights the felony charges against him while running for president, Trump has at times stirred confusion about what he can and can't do in the case. He has pleaded not guilty.

So what does the order do, what doesn't it and where did it come from?

What is a gag order?

Generally speaking, a gag order is a judge's directive prohibiting someone or people involved in a court case from publicly commenting about some or all aspects of it. In Trump鈥檚 case, it鈥檚 titled an 鈥淥rder Restricting Extrajudicial Statements,鈥 with 鈥渆xtrajudicial鈥 meaning outside of court.

Gag orders, particularly in high-profile cases, are intended to prevent information presented outside a courtroom from affecting what happens inside.

Trump also is subject to a gag order in his federal criminal election interference case in Washington. That order limits what he can say about witnesses, lawyers in the case and court staff, though an appeals court freed him to speak about special counsel Jack Smith, who brought the case.

In his recent New York civil fraud trial, Trump was fined a total of US$15,000 for comments he made about that judge鈥檚 law clerk after a gag order barred participants in the trial from 鈥減osting, emailing or speaking publicly鈥 about the court's staff.

The U.S. Supreme Court has acknowledged that gag orders can pit fair trial rights against free speech rights. The court has struck down some orders that barred the press from reporting on certain cases or court proceedings and rejected as too vague a Nevada court rule that limited what all lawyers could say out of court.

Is Trump fighting the gag order?

Yes. Before the trial, he asked a state appeals court to postpone the trial while he appeals the gag order, but the court refused. His appeal of the order itself is ongoing.

Who is covered by the order?

Initially imposed March 26, the gag order bars Trump from making or directing others to make public statements about any juror and about any 鈥渞easonably foreseeable" witness' participation in the investigation or the trial.

It also bars any statements about lawyers in the case, court staffers, prosecution aides and relatives of all of the above, to the extent that the statements are intended to 鈥渕aterially interfere with, or to cause others to materially interfere with鈥 their work on the case 鈥渙r with the knowledge that such interference is likely to result.鈥

The order doesn鈥檛 apply to Judge Juan M. Merchan or to Manhattan District Attorney Alvin Bragg, whose office is bringing the case. It does apply to comments about their family members, however. Merchan added that provision on April 1 after Trump lashed out on social media at the judge鈥檚 daughter, a Democratic political consultant, and made a claim about her that was later repudiated by court officials.

Trump is also allowed to talk about his political opponents, as Merchan made clear on Thursday.

The order also doesn't bar witnesses from commenting on Trump. Michael Cohen, Trump's ex-lawyer and an expected witness, has routinely attacked his former boss, leading Trump to complain about not being able to respond in kind.

Can Trump testify?

Yes. The U.S. Supreme Court has held that criminal defendants have a constitutional right to take the stand in their own defense 鈥 or not to.

There was some confusion after Trump said Thursday that because of the gag order, he was 鈥渘ot allowed to testify.鈥 In context, it appeared he was actually referring to his ability to respond to a reporter's court-hallway question about a witness' testimony that afternoon.

Trump clarified to reporters Friday that he understood the order wasn't a bar on testifying. Merchan emphasized the same in court.

鈥淚 want to stress, Mr. Trump, you have an absolute right to testify at trial, if that鈥檚 what you decide to do after consultation with your attorneys,鈥 Merchan said.

Why did Trump get fined?

Merchan found that Trump violated the gag order with social media posts that laid into Cohen. Among the offending posts: one that asked whether 鈥渄isgraced attorney and felon Michael Cohen been prosecuted for LYING," a repost of a New York Post article that described Cohen as a 鈥渟erial perjurer,鈥 and a Trump post referring to Fox News host Jesse Watters鈥 claim that liberal activists were lying to infiltrate the jury.

Merchan noted that Trump's comment on the Watters segment misstated what the host had actually said, making the comment 鈥渢he words of Defendant himself.鈥

On the other hand, Merchan declined to sanction Trump for an April 10 post that referred to Cohen and Stormy Daniels, the porn performer who got a US$130,000 hush money payment that's at the heart of the case, as 鈥渟leaze bags.鈥

Trump contended that he was responding to previous comments by Cohen, and the judge said the back-and-forth gave him pause as to whether that post met the bar for a violation.

Could Trump really go to jail?

When Merchan fined Trump US$1,000 apiece for nine violations 鈥 the maximum fine allowed by law 鈥 he wrote that 鈥渏ail may be a necessary punishment鈥 for some wealthy defendants who won't be deterred by such a sum.

Merchan added that he 鈥渨ill not tolerate continued willful violations鈥 of the gag order and that, if 鈥渘ecessary and appropriate,鈥 he 鈥渨ill impose an incarceratory punishment,鈥 meaning jail.

It's unclear what would rise to the level of 鈥渘ecessary and appropriate."

Defense lawyer Todd Blanche indicated in court Friday that he plans to appeal the judge鈥檚 finding this past week that Trump violated the gag order.

Prosecutors have asked Merchan to hold Trump in contempt again and fine him US$1,000 for each of four alleged violations from April 22-25. But the prosecution isn't asking for the former president to be locked up over those comments because they happened before Merchan's jail warning and because 鈥渨e鈥檇 prefer to minimize disruption to this proceeding," prosecutor Christopher Conroy said.