A mistake of law occurs when an individual has a misunderstanding or misinterpretation of the legal principles or rules governing their actions. Unlike a mistake of fact, where a person misunderstands a factual situation, a mistake of law pertains specifically to the legal obligations and prohibitions that are in place. This distinction is significant because ignorance of the law is generally not considered a valid defense in criminal cases, highlighting the importance of understanding legal standards.