Stare decisis is a legal principle that mandates courts to follow precedents set by previous decisions, ensuring consistency and predictability in the law. It is foundational in common law systems, although courts may deviate from precedent if there is a compelling reason to do so, allowing for legal evolution over time.