Most inheritance information in most organisms is codified by a special molecule named deoxyribonucleic acid (DNA), which is a double helix of two strands fronted in an antiparallel way. Each strand has a series of units called nucleotids, each being formed by a sugar (nucleous of the chain), a phosphate group and a nitrogen-contained nucleobase (4 types; abbreviated as A, C, G, T), which allow to fix both antiparallel strands by soft joints from its complementary nucleobases (A-T; G-C). The lineal sequence of those nucleobases (codified by triplets) has the information about the key molecules (proteins) structuring cells and tissues in multicellular organisms.
The transmission of inherited information codified in genes is produced by the inheritance laws, discovered in the first place by Gregor Mendel. Most multicellular organism reproduce sexually, i.e. in the typical diploid organism (with 2 copies of its inherited material) needs, by a complex process called meiosis, dividing its genetic material in haploid doses located in specialized cell called gametes. So, the two copies of each gen (that can be identical or not) are randomly distributed, with similar probability, on the gametes. Thus, sexual reproduction is the process which includes from gamete formation to its combination during reproduction, typically in random manner as well, to produce the new diploid organism of the next generation.