HPLC separates the parts of a sample as it passes through a column, and a detector records each part as a peak. The share of the main peak compared with all peaks is reported as the purity percentage.
HPLC shows how pure a sample is, but on its own it does not prove the main peak is the right compound. That is why reports pair it with an identity test such as mass spectrometry.