First law of Newton (dynamics) is applicable when the ink gets stuck due to some reason, as the ink does not move due to inertia. Before getting stuck, the ink gets stopped due to friction of due to no pressure difference, between inside and outside the refill.
Second law of Newton is applied when we strike it with hand or when we shake it vigorously. The force applied creates some pressure differences (high and low) on the air inside the refill. The shaking act gives force to the ink that enables it to overcome viscosity and friction between the walls and start flowing. After that the gravitational force and the pressure difference between inside and outside enable the ink to flow.