A pH is an easy way to describe the acidity of a solution (determined by the [H+] concentration) - it’s easier to say that a cup of coffee has a pH of 5 rather than saying that the “hydrogen ion concentration is 10^-5 molar”.
The way pHs work is through logarithms, which convert a set of values into a new one using a base value. For example, pHs use a base 10 to simplify the numbers, while earthquake energy scales use a base of 32. An increase of 1 on the logarithmic scale is an “n” times increase in the scale, where “n” is the base of the logarithm. So, for example, in the case of pH, three solutions with a pH of 5, 6, and 7 can be related; the pH scale uses base ten, so the pH 6 solution is 10x more acidic than the pH 7, and the pH 5 is 100x (10x10) more acidic than the pH 7. For earthquakes, a magnitude 5 earthquake is 32x weaker than a magnitude 6 and 1,024x (32x32) weaker than a magnitude 7.
The pH formula looks like this:
pH = -log [H+]
The negative sign basically serves to make the low end acidic; without the negative, a pH of 14 would be extremely acidic instead of basic. It’s one of those things that you’ll just have to remember.
So, for your solution, just enter the concentration into the formula:
pH=-log[1.0 x 10^-4] = 4
The pH of this solution would be 4.
Hope this helps!