This fallacy assumes, or asserts, that if one thing happens after another, the first must be the cause of the second. It's a particularly subtle, and tempting, error because temporal sequence is basic to causality.
Post hoc reasoning is related to [magical thinking]?, connecting two things that have no actual or logical connection.