For 2020, the maximum donation is $2800. What trouble will someone be in if they break that rule, either on accident or purposely?
They can be ordered to pay a civil penalty, fined, or imprisoned.
52 USC 30116 (a) (1) (A):
Except as provided in subsection (i) and section 30117 of this title, no person shall make contributions— to any candidate and his authorized political committees with respect to any election for Federal office which, in the aggregate, exceed $2,000;
(The amount adjusts for inflation and I believe this corresponds to the figure that is now $2800.)
Enforcement and penalties for violation are described in 52 USC 30109.
(a) (5) The FEC can try to encourage you to enter into a "conciliation agreement" which may include you paying a civil penalty equal to the amount of your illegal contribution, or, if your violation was "knowing and willful", 200% of the amount.
(a) (6) If they can't reach an agreement with you, they can sue you and ask a court to impose the civil penalty.
(d) (1) (A) For a knowing and willful violation, you can be fined or imprisoned for one year (if the amount is between $2,000 and $25,000), or for five years (if the amount is over $25,000)
The donor will not be "in trouble" (see below), the campaign would be if they accepted more than permitted.
In the past some campaigns have had to refund excessive individual contributions, and frankly it is easier just not accept donations that exceed the limit than to have to handle all the refunding process. So, many campaigns in the past have (particularly with online donations) won't process donations that are in excess.
RE: "in trouble" - While a donation that exceeds the limit is technically a violation of 52 USC 30116, actual prosecution of a donor under that statute almost never happens except where the donation is grossly excessive. (10$ over the limit is excusable, whereas $1 million is obviously excessive) Federal Statues have any number of examples where an action maybe a technical violation but there are literally no actual repercussions (aka "in trouble") for violations. Take for example misstating (lying about) a persons age on the US Census - clearly a violation of 13 USC sec 221, but actually not likely to be prosecuted. Peanut vendors who won't declared the number of peanuts in their possession. -- Well you get the idea.
Additionally: The FEC said donors would be able to give up to $2,800 per election — including both the primary and the general election contests — in the new cycle, Additional Note: "The FEC said donors would be able to give up to $2,800 per election — including both the primary and the general election contests — in the new cycle." So if you want to donate up to 5600, you can do so, however one donation for the primary and one donation for the general -