Class imbalance occurs when the distribution of classes in a dataset is uneven, which can lead to biased models that favor the majority class and perform poorly on the minority class. Addressing class imbalance is crucial in fields like fraud detection and medical diagnosis, where the minority class often holds more significance.