Toxtree operates by applying a series of rule-based algorithms that consider the chemical structure of a compound. It evaluates structural alerts and breaks down the compound's properties into patterns that can predict potential hazards. The software leverages a library of pre-defined rules, which are continuously updated to reflect the latest scientific understanding in toxicology.