For DNA sequences, as default EMBOSS Needle uses ENDfull (DNAfull)
http://rosalind.info/glossary/dnafull/
A T G C
A 5 -4 -4
T -4 5 -4
G -4 -4 5
C -4 -4 -4
Which can be simplified into match=1 and mistmatch=0.
A scoring matrix is read that contains values for every possible residue or nucleotide match.
If you click on "More options" You can see which scoring matrices you can choose from. The default is "BLOSUM62"
https://www.ncbi.nlm.nih.gov/Class/FieldGuide/BLOSUM62.txt
https://bio.libretexts.org/Bookshelves/Cell_and_Molecular_Biology/Book%3A_Investigations_in_Molecular_Cell_Biology_(O'Connor)/09%3A_Protein_Conservation/9.05%3A_BLOSUM62_scoring_matrix_for_amino_acid_substitutions