The results of cooking with heat and with acid are similar, but of course they are not exactly the same. Both heat and acid serve to denature proteins in food, which is a technical way of saying that the molecules change shape. With access to any number of shapes that it couldn’t exist in beforehand, the molecule finds new ways to react both with itself and with other protein molecules. These recently liberated proteins quickly form a solid network, which is why fish gets firmer and whiter when you add lime juice, and it’s the same reason that egg whites turn opaque and get harder upon cooking.
Raw shrimp like this is grayish in color, but when cooked turns a bright pink because a red-colored molecule called astaxanthin remains in the shrimp even after less-stable pigments break up upon being heated.