The gambler's fallacy is a cognitive bias where people mistakenly believe that previous independent events can affect the outcomes of future events in random processes, like gambling. For example, if a coin shows heads multiple times in a row, a player might think that tails is now due. This fallacy stems from the incorrect assumption that randomness will self-correct over time, even though each event remains statistically independent.