The Crocodile will attack you if you get too close, much like the Shaleback. Crocodiles can be found near rivers and are wise to avoid early on.
They can be outrun but require at least 50 meters distance before they turn around and head back to their natural habitat.
They seem to have a higher aggro range from the front. You can get fairly close to them by walking behind or up to their sides before they turn to attack.