Heredity is the transmission from generation to generation, through the process of reproduction, of genetic factors which cause offspring to resemble their parents. Today the science of heredity is known as genetics.
Nowadays we understand that heredity occurs through meiosis, which involves the segregation and recombination of genes. It is of course the particular mix of genes - and their interactions with the environment - which gives rise to unique individuals.
People have long understood that "like begets like", but before the advent of powerful microscopes which revealed chromosomal recombination, the actual mechanisms of how this occurred could only be hypothesized.
One theory, known as preformation, was popular in the eighteenth century. It suggested that prototypical members of each organism - Adam and Eve, in the case of humans - were created by god and contained within them future generations in miniature, perfectly formed, one inside the other, like the proverbial Chinese boxes. (Darwin's theory of evolution was thus doubly scandalous: not only did it argue that god didn't create humans wholesale, but it linked in a long chain of evolution species which, under the ideas of preformation, were distinct and unrelated.)
Lamarck's (now discredited) theory was that acquired characteristics were inherited, in contrast to Darwin's idea of natural selection.
Darwin, however, like Hippocrates and Aristotle, believed in pangenesis, the theory that tiny particles - pangens or gemmules - each bearing the potential for a specific body part, collected in the reproductive cells. As the science of heredity developed further, people began to understand that hereditary material, at least in sexual reproduciton, was transmitted through the two sex cells, and the rediscovery of the work of Gregor Mendel revealed the first scientific laws for heredity.