When one thing rubs and grates against another, it causes friction. That can include two clashing personalities or simply a match striking the matchbox and causing a spark.
A form of resistance, friction is caused by a chafing movement between two or more objects. In the 18th century, friction meant specifically a “resistance to motion,” but a few decades later grew to also describe disagreement or conflict. The friction between the brakes and your tires helps stop your car when you're going too fast. Not speeding in the first place can help avoid friction between you and the traffic police.