The fallacy of affirming the consequent is committed by arguments that have the form:

(1) If A then B
(2) B
Therefore:
(3) A

The first premise of such arguments notes that if a state of affairs A obtained then a consequence B would also obtain. The second premise asserts that this consequence B does obtain. The faulty step then follows: the inference that the state of affairs A obtains.

Examples

(1) If Fred wanted to get me sacked then he’d go and have a word with the boss.
(2) There goes Fred to have a word with the boss.
Therefore:
(3) Fred wants to get me sacked.

This argument is clearly fallacious; there are any number of reasons why Fred might be going to have a word with the boss that do not involve him wanting to get me sacked: e.g. to ask for a raise, to tell the boss what a good job I’m doing, etc. Fred’s going to see the boss therefore doesn’t show that he’s trying to get me fired.

(1) If Zeus was a real, historical figure, but the Catholic Church covered up his existence, then we wouldn’t have any evidence of a historical Zeus today.
(2) We don’t have any evidence of a historical Zeus today.
Therefore:
(3) Zeus was a real, historical figure, but the Catholic Church covered up his existence.