Chain cannonball ammo is sold by the gunsmith, and you will find one in the major ports — Tortuga and Port Royal are the two most players use, and other settlements have them as well.
Chain shot is the one to stock for ship battles, since it is aimed at rigging and sails rather than the hull. Running out mid-engagement is the usual reason a fight turns, so it is worth buying in bulk before you head out of port.