They way you are using it, log(x), or "common logarithm" is the inverse function to 10^x. That is, if y= log(x)= log_{10}(x) then x= 10^y. ln(x), the "natural logarithm", is the inverse function to e^x ("e" is an irrational number, approximately 2.718...). If y= ln(x) then x= e^y. The common logarithm is used because our number system is base 10 so it is relatively easy to tabulate: log_{10}(3.00\times 10^5)= 5+ log_{10}(3.00) so that it is sufficient to tabulate logarithms for 1 to 10.
While "e" is a rather peculiar number, it has some nice "Calculus" properties. For example, if y= e^x the "instantaneous rate of change" of y, as x changes, is again e^x which means that the "instantaneous rate of change" of ln(x) is 1/x, a very easy function. Since the invention of "calculators", common logarithms are used a lot less so that it is becoming common to use "log(x)" to mean the "natural logarithm" as well as "ln(x)".