How does an indicator work
This explanation is true for most organic indicators. Litmus is a complex mixture of organic molecules. The molecule responsible for the color change (the chromophore ), is 7-hydroxyphenoxazone (image taken from Wikipedia, public domain):See that $\ce
procedure: only the hydrogen matters in the acid-base equation). Then the acid-base equation is:
As more strong base is added, more hydroxide ion is present, driving the equilibrium to the right and producing more $Lit^-$ ion. And now, the color change: $HLit$ is red, but $Lit^-$ is bue. So the more acidic your solution, the more the equilibrium is to the left and thus there is more $HLit$ than $Lit^-$.
Litmus is pretty good for checking rough acidity or basicity, because its midpoint pH is close to 7 (neutral). Litmus is as red as it gets at a pH of 4.5, and is as blue as it gets at a pH of 8.3, so the midpoint is about 6.4, a bit more acidic than pure water.