Because Heated Shot is an attack multiplier for towers, but not for Castles and Harbors, the actual increase in attack bonus against ships differs for the affected buildings.
Note that, before the launch of The African Kingdoms, it was highly unrecommended to stay close to building fire not only with ships, but also with Camel Riders, Mamelukes, and Saboteurs, as they took bonus damage from anti-ship attacks. In The African Kingdoms, however, that was changed and camel-type units were moved out of the ship armor class.
Coastal gunners who engaged ships learned to heat their cannonballs in furnaces until they were red hot. If a heated shot lodged in the woodwork of a sailing ship, it could set the ship afire. The wadding in the barrel of the gun had to be sufficiently thick to not burn away before the cannon could be fired. If the shot burned through the wadding too quickly, the gun could go off before being properly aimed. In such a case the gun might explode rather than fire. Heated shot that plunged through decks was especially dangerous. It could lodge deep in the ship where the crew could not reach it with water before fire had taken hold. If fire reached the powder magazine, the ship would explode.