Glue is made up of a substance that sticks to things and a solvent that keeps it liquid until you want it to stick. When you put glue on a piece of paper, the solvent gradually evaporates until the glue becomes sticky. When the glue is in a bottle, there is a space inside the bottle above the liquid that is full of air. So why doesn't the glue dry out? Well there's a limit to the amount of solvent that can evaporate to fill the space in the bottle. Once the space is full of solvent gas, no more solvent evaporates from the glue and the glue stays runny.