The deeper the balloon is dipped into the water, the more it is compressed. Because of that compression, the coloured liquid rises in the glass tube. In order to return the liquid to the balloon one has to pull the balloon out of the water.