Headspace is the distance measured from the part of the chamber that stops forward motion of the cartridge (the datum reference) to the face of the bolt.
If the headspace is too short, ammunition that is in specification may not chamber correctly. If headspace is too large, the ammunition may not fit as intended or designed and the cartridge case may rupture, possibly damaging the firearm and injuring the shooter. (Source: Davis, William C., Jr. Handloading (1981) National Rifle Association)
Headspace is measured via headspace gauges.