Hemagglutination occurs when specific antigens on the surface of red blood cells interact with corresponding antibodies, causing the red blood cells to clump together.