Cannons were historically made from wrought iron, cast iron, or bronze.
Small, lightweight, basic cannons, or Culverins, had been used on ships through the middle ages. They were generally fired by individuals or two to three men from firing positions on deck. Ships could only have a small number of lightweight cannons because large cannons are very heavy, and a heavy object placed on the deck of a ship will always make it unstable. It was not until Gunports were invented around 1501 that ships could have on full size cannons as a main armament. A gunport is a window, cut in the side of a ships hull, that a cannon could be fired from. They allowed the cannon to be installed low down in the ship. Gunports had wooden doors hinged above them, so that the gunport could be closed when the gun was not fired. This stopped water washing coming into the ship from waves, or when the ship was heeled over. This meant that a ship could have lots of heavy powerful cannons, without becoming unstable, and the cannon soon became the main armament in naval warfare. An early example being the Mary Rose, built in 1512. The Mary Rose Had 78 guns, but this was later increased to 91.
From the mid 1600's onward war at sea was dominated by the tactical system known as 'line of battle', this involved a fleet navy ships forming a long line, parallel to their opponents. The ships would then fire 'rootsides' with their cannons at their opponents in an effort to sink or cripple them. With this in mind, the British navy divided their ships into six ratings, based on how many guns (military term for a cannon) they could carry, only the top three ratings were known as 'ships of the line'. A first-rate ship of the line had to carry over 90 guns and could have as many as 140 guns, spread over 3 or 4 gun decks, a second-rate ship had over 80 guns, and a third-rate over 54. A fourth-rate (not a true ship of the line) had over 38, a fifth-rate over 18, and a sixth-rate over 6 guns.
Naval guns are generally refereed to by the weight of the shot they fire, so a '42 pounder 'was a cannon that fired a cannon ball or' shot 'that weighed 42 pounds. The 42 pounder, also refereed to as a 'standard' size cannon, was used on ships from around 1600 till the early 1700's. They were huge. The barrel was about ten feet long, and weighed approximately 3.4 tons on its own. A 42 pounder would have required an 8 man team to fire. They were very powerful, and had a good range, the disadvantage was that they were cumbersome, slow to fire, and required a large gun crew. The 42 pounders would always be kept on the lower gun decks otherwise their weight could make the ship unstable.
A more widely used cannon in the British navy during the 1600's, 1700's and early 1800's was the 'Demi Cannon', or 32 pounder. This was smaller and lighter than the 42 pounder, requiring a 6 man gun crew, and having a 9'6 “barrel weighing around 2.6 tons. maximum range of 1.5 miles and was reputed to be able to punch through a meter of oak at short range. 12 and 24 pound cannon were also very popular, being lighter and faster to reload, they could be mounted on the upper gun decks of a ship without making her unstable, these made up the bulk of the armament on HMS Victory.
The 'Carronade' was a design of cannon that was used in a range of sizes, from 6 right up to 68 pound shot. It was developed in the 1770's and used until the 1850's. The Carronade was developed by a Scottish company and machined to a high standard to allow a tight fit between the ball and shot, and the muzzle. This meant that the cannonball only just fitted in the cannon, (the bore was only slightly larger than the shot diameter, there was less 'windage' in naval terms). The chamber for the powder charge of a Carronade was one calibre smaller than the bore where the cannonball sits and is fired out, this meant you had a smaller powder charge firing a bigger shot. This meant the internal stresses on the gun were much reduced, so you could have a small light barrel which fired a big heavy shot. The downside was a short range and limited accuracy. A Carronade could be fired by a 5 man gun crew, and its light weight meant it could have been used on a ship's deck. A Carronade be about a third the weight of the equivalent standard cannon. A 68 pounder had a maximum range of about.7 miles. The Carronade was effective at short range and was refereed to as “the smasher” because of the splinters it caused on impact.
Most of a ships guns would fire to the side (to port and starboard), however it was common practice to have a few guns aimed from the bow or stern. A gun called a “long nine” was used for this purpose, firing only a nine pound shot, the longer barrel wave extra power and accuracy, and fitted well into the available space.
The Paixhans gun was introduced in the 1840's and revolutionized the naval combat because it was a direct fire gun that could fire an explosive filled shell on a time delay fuse. This signaled the end of the conventional cannon. The introduction of rifled bores, and steel jacket barrels heralded a new era of naval combat, and led to the demise of the wooden hulled man-o'-war.