Suppose you're walking in the countryside and see a village ahead of you.
You can see a church. Close your left eye, stretch out your arm and point, lining up the tip of your finger with the church.
Now close the other eye instead. Suppose your finger now points to a house somewhat to the right.
You know, or can estimate, that the distance between those two buildings is 300 m. You can then immediately say that you're about 3 km away from the village.
How does that work?
Actually it's a simple example of the principle of parallax, the displacement in the apparent position of an object when viewed along two different lines of sight.
It depends on the fact that, for most of us, the distance between our eyes ("a" in the diagram) is about one-tenth of the distance from our eyes to the tip of our finger ("b").
The triangle lrf in the diagram is similar to the triangle chf. So, the village is about ten times as far from you as the distance between the church and the house.