How does a cannonball work?

Seemed to be just big low tech iron balls when observed stacked up next to old cannons. How did they stay intact when fired and explode when they hit the target, or did they stay intact?

This was covered in a recent thread. The short of it is that 98% of the time they just hit stuff (think the soldiers head in The Patriot) the other 2 they were drilled and filled with powder with a fuse.

Cannonballs were solid (either stone in the early days, then later iron) up until Henry Shrapnel invented his exploding cannonball in the late 18th Century, in time for the Napoleonic Wars.

Case/canister shot (basically hundreds of musket balls and bits of metal shot out of the cannon like a giant shotgun) had a short range, perhaps 300 yards, so solid round shot was the only way to reach enemy troops.

Shrapnel invented a round shot which could explode over the enemy and disperse its contents (shrapnel).

I cant imagine solid iron cannonballs breaking apart, thats why they were made of iron, so they wouldnt.

Perhaps the earlier stone balls broke up though.

Everything old is new again. Thanks!