My knowledge of law is minimal, I'm curious about edge cases in the jury/judge dynamic. When can they override each other, interesting situations where decisions that would typically be made by one party gets made by the other?
It depends on what the jury said, and if it's criminal or civil.
In criminal cases, the judge may almost never set aside a verdict of acquittal. There is a single case in the US in which this happened, and it was a bench trial (no jury). That case featured the defendant bribing his trial judge; the Seventh Circuit held that he was never in jeopardy due to the bribe. As far as I can tell, that's the only one. There have been no cases that I can find of a jury's verdict of acquittal being overturnable. Judges can poll the jury to make sure they're unanimous (at least in federal court), and if they aren't then it's a mistrial, but that's because the jury was never in agreement in the first place.
On the other hand, a judge has several ways to enforce an acquittal. In federal court, for instance, the defense can move for a motion of acquittal either before or after the case goes to the jury. If the motion is granted before the verdict, double jeopardy applies to retrial. If it's granted after a conviction, then the judicial acquittal can be reversed on appeal, possibly requiring a new trial.
Before the verdict is returned, the judge can declare a mistrial. After the verdict is returned, it's too late for that.
In civil cases, things are more complicated: double jeopardy does not exist there. There, there is a notion of a judgment as a matter of law: the judge determines that, based on evidence presented, no reasonable jury could possibly find the other way. This can happen before or after the verdict, and is appealable.
In the United States, this is known as judgement notwithstanding the verdict. According to the Federal Rules of Civil Procedure, the judge in a civil trial can override any decision by the jury if they find that no reasonable jury would have reached that decision; for procedural reasons, there must have been a prior motion for judgment as a matter of law in order for the judge to do this.
Overruling a jury's verdict in a criminal case is more difficult because of the Sixth Amendment right to trial by jury. In general, a verdict of "not guilty" cannot be overturned, while a verdict of "guilty" is overturned through procedures other than having the trial judge override the jury's decision.
A judge cannot overrule a decision by a jury that came about in a legal way. That is, the law basically protects juries against the consequences of their decisions.
The judge can intervene in the jury process if there was something tainted. For instance, if a third party had tried to bribe one or more jurors, or some juror claimed that they were tricked or bullied into casting the "twelfth" vote.
One side of this commonly falls under the term jury-nullification, wherein juries disregard the law and (usually) a judge's instructions in rendering their verdict.
On the other side, my understanding is that judges can pretty much do whatever they want. If they don't like what a trial jury does they can declare a mistrial; if they don't like a guilty verdict they can simply overturn it; and if they don't like a sentence, they can just change it. In practice the only thing that checks a judge's power in the courtroom is being overruled by higher courts.
Clarification: One thing a judge cannot do is declare a mistrial after a jury has delivered a verdict of innocence: that would violate the clear constitutional prohibition of double jeopardy.