Histochemical stains work through various chemical reactions that involve binding dyes to specific cellular components. For example, hematoxylin binds to acidic structures like nucleic acids, while eosin binds to basic structures such as proteins. The specificity of these reactions allows for the precise identification of different cell types and tissue components.