The package BioPython allows to compute pairwise local or global alignement, through different functions (align.globalxx, align.localxx, ...).
However, I have not found anywhere the algorithm on which this alignement is based. The code (source, doc) states: "Pairwise sequence alignment using a dynamic programming algorithm", and that is all.
Edit: This is a question more for citing than for understanding purposes.
The docstring of a private function in the code indicates that "This is an implementation of the Needleman-Wunsch dynamic programming algorithm as modified by Gotoh, implementing affine gap penalties." (l. 761 of this code).