It's the acid in the citrus that 'cooks' the shrimp. When meat is cooked, the proteins in the meat go through a process called "denaturing," which permanently alters the original state of the proteins. That's why egg whites turn from clear to white when they are cooked. Their proteins have been permanently altered. Ceviche works by using acid as the means of denaturing the proteins instead of heat. The acid (just as with heat) kills off any bacterial growth, and permanently alters the proteins, or 'cooks' them.