Heritability is a technical term, which originated in agriculture before World War 2, that has no obvious relationship with the colloquial idea of a parent passing on genes to an offspring. The technical meaning can be presented in a not-so-mathematical way and thus made accessible for non-specialists. (That, in turn, makes it easier to speak clearly about the limitations of research on the heritability of human characteristics, but that is not a topic for this post.)
In the picture below, we imagine many genetically defined and reproducible varieties of, say, plants, raised in many locations. (Genetically defined is easy to visualize if individuals of the variety are clones of each other, as they are when a plant is grown from a cutting of another plant. It can also be thought of as genealogically defined, e.g., each individual is a grandchild of the same two pairs of grandparents.)
In each location multiple individuals—”replicates”—are raised. The individuals in all the locations for all the varieties are all measured for, say, height, and there is variation among those measures—thus the different sized curly brackets below.
The average or mean height for each variety can be calculated and there is variation among those variety means. Heritability is the ratio of variation among the variety means and the total variation across the whole data set. That’s it. Notice that heritability is derived from measurements of an observed trait; there has been no mention of genetic or environmental factors involved in producing the trait.
With humans, we can replicate a variety in the form of identical or fraternal twins, so, with only two individuals in each genetically defined variety, there will be many, many points in the diagram below for which there is no measured value. That means that the estimate of heritability must be more approximate.