Addition to previous answers:
PSI-BLAST is a sort of machine learning algorithm which uses the results of the first alignment (PSSM) to score the next iteration of alignment. I would recommend you to refer to the NCBI bookshelf page on PSI-BLAST.
PSI-BLAST adopts a scoring scheme (PSSM) that is built based on a given set of data (the aligned sequences), rather than using a generalized scoring matrix. This improvisation updates the prior knowledge of the homologs and helps to detect similar sequences that were otherwise undetectable. With iterations the PSSM keeps getting updated, thereby, making the BLAST more sensitive in finding homologs.
How PSSM is constructed:
If a position in the alignment is conserved (i.e same residue in many sequences), it receives a high score whereas a position with low conservation gets a low score.
Score is based on relative counts of a residue in a position. If you want to know the details see here.