Modus ponens and modus tollens
Modus ponens and modus tollens are the two fundamental rules of inference of classical logic, and both are valid. Modus ponens states that if you grant "if A then B" and you grant "A", you may conclude "B". Modus tollens states that if you grant "if A then B" and "B" is false, you may conclude that "A" is false too.
These two rules form the backbone of deductive reasoning. They have to be distinguished from two errors that resemble them but are invalid: affirming the consequent, which concludes "A" from "B", and denying the antecedent, which concludes "not B" from "not A". Confusing the one pair with the other is a frequent source of faulty reasoning.
An example
"If it is raining, then the ground is wet; it is raining, therefore the ground is wet" illustrates modus ponens. Modus tollens would run: "the ground is not wet, therefore it is not raining".