This is probably the most well-known of the logical fallacies by the public at large, either by its Latin name post hoc ergo propter hoc (“after this, therefore because of this”) or by the not entirely correct name”correlation does not imply causation.” It’s not entirely correct because it can be the case that correlation does imply causation, so for the sake of intellectual integrity we insert the “necessarily.” Simply state: Two events go together, therefore one caused the other. That’s not necessarily true, for the causation could go the other way or both events could be triggered by a third.
There are actual two subtly different variations, to be sure: post hoc and cum hoc (“with this”). Post hoc says that Event A was followed by Event B, therefore A caused B (the classic example is: people do a lot of shopping in November and December, then Christmas happens, therefore shopping caused Christmas). Cum hoc ergo propter hoc merely says that two events go together regardless of chronological ordering (murder rates and the consumption of ice cream correlate with one another, therefore ice cream eating causes homicidal tendencies. Or they both also correlate with happening more often during the summer).
What’s needed to improve the validity of a causal claim are controls. One needs to eliminate as many as possible third triggering events, and providing a mechanism doesn’t hurt either. The more controls are introduced, the higher the confidence we can have in believing the causation claim. Remember though that knowledge of this fallacy can be abused, where “correlation not causation” can be tossed out as an excuse to ignore an argument. The “necessarily” is, well, necessary, because the causation could follow from the correlation. The greater the weight of the evidence, the more certain we can be in the conclusion (as always).