In a Pairwise Alignment, two sequences are padded by gaps, to achieve same length, and to display maximum similarity/conservation on a character-by- character basis. An optimal Pairwise Alignment is an alignment which has an optimal score (i.e. maximum similarity, or minimal cost).
Pairwise Sequence Alignment