pH is a logarithm
Square brackets mean concentration in mol dm⁻³. The minus sign is there so that everyday values come out positive.
A strong acid. 0.0100 mol dm⁻³ hydrochloric acid is fully ionised, so [H⁺] = 0.0100 mol dm⁻³ and pH = −log₁₀(0.0100) = 2.00.
Water ionises too
Even pure water contains a few ions, because water molecules pass H⁺ between them:
At 298 K, Kw = 1.00 × 10⁻¹⁴ mol² dm⁻⁶. In pure water [H⁺] = [OH⁻], so each is 1.00 × 10⁻⁷ and the pH is 7.00.
Kw lets you find the pH of an alkali. For 0.100 mol dm⁻³ sodium hydroxide, [OH⁻] = 0.100, so [H⁺] = 1.00 × 10⁻¹⁴ ÷ 0.100 = 1.00 × 10⁻¹³, and pH = 13.00.
The ionisation of water is endothermic, so Kw grows with temperature. At 50 °C it is about 5.5 × 10⁻¹⁴, and pure water has a pH of about 6.6. It is still neutral, because [H⁺] still equals [OH⁻]. Neutral means equal, not pH 7.
A weak acid
Ethanoic acid only partly ionises: CH₃COOH ⇌ H⁺ + CH₃COO⁻. Its acid dissociation constant at 298 K is Ka = 1.74 × 10⁻⁵ mol dm⁻³ (pKa 4.76).
For a 0.100 mol dm⁻³ solution, assume [H⁺] = [CH₃COO⁻], and that so little ionises that [CH₃COOH] is still 0.100. Then [H⁺]² = 1.74 × 10⁻⁵ × 0.100, so [H⁺] = 1.32 × 10⁻³ and pH = 2.88. Hydrochloric acid of the same concentration has a pH of 1.00: the weak acid has about 75 times fewer hydrogen ions.
Counting, not just measuring
Water is about 55.5 mol dm⁻³ (1000 g ÷ 18.0 g mol⁻¹). So at pH 7 there is one H⁺ for every 55.5 ÷ 10⁻⁷ ≈ 5.6 × 10⁸ water molecules, about one in half a billion. That is what the simulation draws.
Strong acids and alkalis cause serious burns, especially to the eyes. Titrations and pH measurements are done in a lab with eye protection and a teacher.