Mil is short for milliradian. A milliradian is 1/1000 of a radian. A radian is the angle that subtends an arc such that the length of the arc is equal to the radius of the arc.
In the diagram above you can see that the 1 radian angle cuts the circle creating an arc. The length of the arc is the same as the length of the radius. The size of a radian was chosen to make this true.
Recall that pi is the ratio of the circumference of a circle to its diameter. Since the radius of a circle is half of its diameter, the circumference = 2 x pi x radius.
Because we have chosen an arc length equal to the radius, the circumference is also = 2 x pi x arc length. It follows that there are 2 x pi radians in a full circle.
Radians turn out to be really useful measures of angle when working with circular functions like sine and cosine, but that does not concern us.
Refer once again to the diagram. The 1 radian angle subtends the line segment labeled "chord" as well as the arc. But obviously the cord is shorter than the arc since the cord follows a straight line while the arc takes the scenic route.
On the left side of the circle there is a smaller angle with a smaller chord. The length of this chord is much closer to the length of its arc. As the angle gets smaller and smaller the lengths of the arc and chord get closer and closer. This is what is useful to the shooter.
Because the ratio of radius to arc length is 1:1 for a one radian angle, the ratio is 1000:1 for a one milliradian angle. And because at small angles arc length is nearly equal to chord length, we can say that a mil is a yard at 1000 yards.*
In other words if you peer through your mil dot scope and see an object that you know to be 1 yard long and it just fits between one mill dot and the next, it must be 1000 yards away.
Closer objects will take up more mil dots. That 1 yard long object will span 2 mils at 500 yards and 10 mils at 100 yards.
Bigger objects will be further away. A 2 yard long object that spans 1 mil is 2000 yards away.
Divide the known size by the mils spanned and then multiply by 1000.
A 5 yard long vehicle that spans 15 mils is 333 yards away. 5/15 = 1/3 and 1/3 x 1000 = 333.3
*This works for any units, feet, meters, rods, miles etc. The range will be in the same units as the object of known size.
A mile high mountain you see from your boat that subtends 125 mils from sea to peak is 8 miles away.
Size can be estimated with mil dots if you know the range.
Divide the known range by 1000 then multiply by the mils subtended.
Suppose MI 6 sends you to Badninjastan to get a look at a rumored new experimental aircraft. (James Bond was otherwise engaged.)
You sneak into the hills overlooking a remote airstrip. You glass the area with your scope. There it is! It looks big, but it sits all alone with nothing to use as a reference.
The wings span 8 and 1/3 mil dots in your scope.
Glancing at your topo map you can see that you are exactly two kilometers away.
Some quick math tells you that this plane has a wingspan of 16.7 meters! (2000 meters [2K] divided by 1000 = 2 meters and 2 meters x 8 1/3 mils = 16 2/3 meters which rounded to a decimal = 16.7 meters)
Hey, that's not big! Why a 1934 Lockheed Electra had a 16.7 meter wingspan.
Wait! There is an old (really, really old) thin woman in a leather jacket on the wing . . . Nah, couldn't be.
You call for extraction and spend the next week on the Riviera with Ursula Andress. (James Bond was otherwise engaged.)