Here is the classic explanation to this question. All crocodiles are reptiles, but not all reptiles are crocodiles. So, most reptiles have 3 chambered hearts, but crocodilians have 4 chambered hearts.
Here are additional information for other organisms:
Amphibians have 3 chambered hearts
Turtles have 3 chambered hearts but with an incomplete wall in the single ventricle, so their hearts are functionally 4 chambered.
Birds and mammals have 4 chambered hearts.
I hope this helps!