Headspace is the distance from the breech face to the part of the chamber which stops forward movement of the cartridge caseNRA firearms factbook 3rd edition
To correctly hold a cartidge in a chamber it needs two contact points, one to stop rearward motion (the breech) and one to stop forward motion. The point on the cartridge that stops forward motion depends on the type of cartridge. A rimless pistol cartridge has the front lip of the cartridge stopping forward motion. This makes it easy to measure headspace on a rimless pistol cartridge as it simply equals the cartridge overall length.
A rimmed, or semi rimmed pistol cartridge and a rimmed rifle cartridge headspace on the rim. For the rimless rifle cartridge, the headspace is the distance from the breech to the mid point of the shoulder. As the rifle ages the chamber elongates slightly and causes the headspace to lengthen. If the headspace is too long, the cartridge will stretch too much during shooting causing the cartridge to split just above the head of the cartridge. The nice thing about a headspace check is, assuming it is a quality rifle originally produced with the correct headspace, you can get a feel for how much the rifle has been used and how much longer you can expect to use it.