In order to see how glue works, we have to know what glue really is. Like everything else in the world, glue is made up of many tiny separate bits called molecules. Each molecule works somewhat like a magnet. It pulls the neighboring glue molecules toward it. We say it attracts them. A glue molecule also attracts the molecules of paper and wood and other materials. This attraction becomes very strong when the glue gets dry. The molecules pull hard on each other and on the materials that need to be held together, and so it makes them stick tight.
There are different kinds of glue. The molecules of some kinds attract wood or paper. Other kinds attract china or glass. Still others work well on almost all materials.
The kind of glue called mucilage is made from the hoofs and horns of animals. Rubber cement comes from rubber, and there is a milky white kind of glue that really is made from milk.