In the books, Priori Incantatem only happens once, when Harry and Voldemort's wands connect during their duel in the graveyard at the end of Goblet of Fire. This happens because their wands both contain a feather from the same phoenix (Fawkes).
The Goblet of Fire movie includes this scene and explanation, but subsequent films show this same effect on numerous other occasions when the duelling wizards' wands share no such link. No explanation is given, the filmmakers probably just really liked the effect and kept recycling it.
This is particularly confusing as the Deathly Hallows movies do stick with the storyline of Voldemort looking for a new wand so that Priori Incantatem won't prevent him from killing Harry this time, yet after several wand changes the films show it occurring between them anyway.