The acidity or basicity of a substance is measured using the pH scale. The pH scale ranges from 0 to 14, where 0 represents a strong acid, 7 is neutral, and 14 represents a strong base. pH values below 7 indicate acidity, while values above 7 indicate alkalinity or basicity.