This report shows how the descent of genome from an ancestor to currently observed descendants results in identity by descent (IBD) in current individuals, and hence similarities in their DNA at genetic marker loci. Conversely, data on the marker genotypes of individuals provides inferences of shared descent of genome in current individuals, not just genome-wide, but in specific genome regions. Regions where shared genome accords with phenotypic similarities for a trait provide evidence of causal DNA at some location in the region. The report considers both data observed on defined pedigree structures, and data on population members whose pedigree relationships may be remote and are unknown. We take a model-based approach, deriving probabilities of IBD and likelihoods of mapping parameters, given observed genetic data. We first consider probabilities of gene IBD among individuals and across a chromosome, using either a known pedigree or a population-based model. We then consider probabilities of genotypic and phenotypic data on individuals, conditional on latent IBD. Thence IBD may be inferred from marker genotypes, combining information from multiple SNP markers. Finally, we show how location-specific realizations of IBD can be used to address questions of gene mapping. By focusing on IBD, we unify pedigree and population-based approaches. This report was first written in 2013, as an invited chapter for a proposed text book on identity by descent. It was revised and updated in March 2017. I am grateful to two referees of the earlier version for their comments. Work on this report was supported in part by NIH grant R37 GM046255, and was completed in 2017 while visiting the University of St.Andrews, UK, as a visiting Carnegie Centenary Professor.