Contrastive learning is a self-supervised approach where the model learns by comparing similar and dissimilar data pairs, pulling similar representations closer in embedding space while pushing dissimilar ones apart. Models like CLIP use it to match images with text without explicit labels. It has driven breakthroughs in visual representation learning, enabling powerful zero-shot image classifiers.