Indicators change color in the presence of an acid or a base, helping to identify whether a solution is acidic or basic.