The logarithm is a mathematical operation that calculates the power to which a given number (called the base) must be raised to obtain a given value. In the case of log2, the base is 2.
So, log2 1024 means, what power must we raise 2 to, to get 1024.
By definition, we have 2^10 = 1024, so log2 1024 = 10.