Free-riding occurs when an individual or firm benefits from the actions and efforts of another without paying or sharing the costs.