in every court room, the judge will tell the jury about which laws are relevant under the current context. Not only that, the judges also monitor the lawyers during the case and prevent them from colluding the juries with misleading information.
The jury then use the relevant laws as the basis of their judgement when they're making the verdict.