Generally speaking, diesel generators and main engines use fresh water to cool the body, cylinder liners and cylinder head. Fresh water is a closed circulation system, then sea water is used to cool the fresh water.
If sea water is used for direct cooling, it will cause engine corrosion. Sea water is too corrosive.
Heat exchangers used to cool fresh water from sea water are usually made of copper and are resistant to corrosion.