In a fountain pen there is an ink reservoir to store the liquid ink. There is a nib with a thin path way (underneath and through the middle) for ink to flow from the reservoir on to the paper steadily.
The ink flows in the downward direction, due to gravity and due to capillary action in the narrow opening from the ink reservoir to the nib. There are adhesive forces between the ink and the materials of the pathway. There are cohesive forces among the ink molecules.
Normally the ink does not flow out from the reservoir through the capillary as the outside air pressure, does not let it flow out. Formation of vacuum or low pressure inside the ink reservoir (as ink flows out) does not let more ink to flow out.
In a fountain pen there is a black plastic part underneath the nib. On the sides of that there are projections to let air go in through the capillaries. There are often three thin parallel capillaries in the center towards the ink reservoir. So as the ink flows outside, air flows inside the ink reservoir through other capillaries as bubbles to the empty space at the top of reservoir. Thus air pressure on top of ink in the reservoir helps the flow in a controlled way and the capillary action in the nib.
When the capillary opening becomes large, or if the nib is not tightly placed inside the neck of the pen, then ink flows runs out freely and spoils the paper. This happens due to free flow of air towards inside of the ink reservoir.
A parallel to this is, make a small opening to a sealed full mineral water bottle with a needle. You can observe that water does not flow out quickly. This is because air is not able to enter the bottle as water flows outside. This is the principle.