An alignment of two strings is formed by adding gap symbols (
A run of contiguous gap symbols in one string is called a gap. Thus, aligning homologous genetic strings allows us to infer substituted symbols (from mismatched symbols) as well as insertions and deletions (from gaps) that have arisen throughout the course of evolution. See the figure below for a sample alignment of protein strings. We see a large gap in the bottom string of the first alignment, implying that the corresponding amino acids in the top string have all been deleted. In a reverse scenario, these symbols are inserted into the bottom string to yield the top string.
Consult the entry on multiple alignment if you would like to read about the case in which we align more than 2 strings simultaneously.