The ballpoint pen work on the principle of surface tension.
The surface tension of the ink will decide how effectively it spreads itself over the ball.
If the surface tension is too high, the ink won’t spread over the ball properly however if the surface tension is too low, the ink will get spoiled on the paper.
When this ball rolls over a piece of paper, the ink will flow to the paper due to friction between the pen and the paper.
Capillarity is defined as the rate at which liquids move across a surface or between two surfaces.
Hence, the ballpoint pen works on the principle of capillary action due to the surface tension.