It’s all to do with air flow. When a player slices across a football, it begins to spin. As it travels through the air, the side that is going with the wind has increased drag and the side going against the wind has reduced drag.
This creates a pressure imbalance with lower pressure on the side with increased drag. The ball then gets pushed that way and that’s what the curl is.
With Ronaldo’s knuckleball free kicks, he aims to kick the ball with as little spin as possible. As it flies through the air, a layer of air wraps itself tightly round the ball. If that layer is disrupted by an imperfection, like a stitched panel edge, it will deviate, causing that unexpected swerve and dip.
Here is a video showcasing ten of the best free kicks of all time.