Sorry, but this might get lengthy, so bear with me please :)
#[pH]#(http://socratic.org/chemistry/acids-and-bases/the-ph-concept), or potential of Hydrogen, is measured on a scale from 0 to 14. 0 being the most ACIDIC, while 14 being the most BASIC.
To find #pH# from the concentration of #H_3O^+# (or just simply #H^+#) you need to do the following:
#pH#= -log[#H_3O^+#]
The [#H_3O^+#] is just the concentration (in molarity) found through calculations (I'll cover that soon)
If you have the concentration of #OH^-#, however, simply find the #pOH# by:
#pOH#=-log[#OH^-#]
After you get this number, you do the following:
#pH#= 14-#pOH#
OK, so lets start with the basics of determining your #H_3O^+# or #OH^-# concentrations. Molarity is the standard unit for concentration in chemistry, and is simply moles of substance over liters of solution.
#M=(mol)/(volume (L))#
So whenever I say concentration, I mean Molarity.
You find the concentration of #H_3O^+# by first writing out your acid dissociation equation:
#HA#+ #H_2O#= #H_3O^+# + #A^-#
...where #HA# is simply the acid you're dissolving in water.
If you have a STRONG Acid, then it dissociates (dissolves) completely in water. The concentration of #H_3O^+# is the same as the concentration of the initial acid.
Now, you were probably given the #Ka# of the acid, telling you that it is a WEAK acid. That means that it does NOT dissociate (dissolve) completely in water. The Ka at this point is just a number to plug into your equation.
To find the concentration of #H_3O^+# from the #Ka# and your equation, simply plug the numbers that you have into this:
You can do the exact same thing if its a BASIC solution, just replace [#H_3O^+#] with [#OH^-#] and dont forget to change the #pOH# to #pH#