Try changing the base a with the slider. Since the exponential function y=aˣ and the logarithmic function y=logₐx are inverses of each other, they form a perfect reflection across the line y=x.
Read 2³=8 as "multiply 2 by itself 3 times to get 8," and that's an exponent. Ask the reverse question, "how many times do I need to multiply 2 by itself to get 8?" and that's a logarithm. The answer is 3, written log₂8=3. In other words, solving aˣ=y for x gives x=logₐy — it's the exact same relationship, just viewed from a different direction.
Drawing this relationship as a graph makes it much clearer. If the point (p, q) lies on y=aˣ, then the point (q, p) must lie on the logarithmic function y=logₐx. A point with its x- and y-coordinates swapped is always symmetric to the original point across the line y=x, so the two graphs form a perfect symmetry, as if reflected in a mirror. Change the base a with the slider and check that the two graphs always keep this mirror-image shape across y=x.