caliber

rifles

usually measured from the rifling's land to land

sometimes have a second number that doesn't actually mean anything: 30-30 is 30 caliber and used to have 30 grains of gunpowder. .30-06 references when it became the official ammunition of the US military in 1906.

There can be different kinds of ammunition with the same caliber: use the proper ammunition

shotguns

larger number = smaller hole: it's the number of lead balls the size of the bore it takes to weigh one pound.