Contrastive learning teaches a model similarity by example: show it correct pairs and wrong ones, and reward placing matches close while separating non-matches. It produces the shared image-text spaces that make zero-shot recognition and search possible.