How does glue actually work?
How does glue actually work, is it to do with electrons etc?
Many things to do with chemistry are to do with electrons!
There are various ways in which glue can work: the simplest is that, if you have two slightly rough surfaces with tiny pits in them, putting a liquid which can set between them creates lots of little 'plugs' in the pits. Once it's set, you can't pull these out of the pits, so you can't pull the surfaces apart.
Alternatively, if you have two perfectly flat surfaces, they will tend to stick together by a force called the van der waals forces: the molecules of the surfaces tend to attract. Normal surfaces, though, will have dust or imperfections, and so cannot get close enough together to allow these forces to act.
If you put something "squidgy" - or fluid - between two surfaces - glue for example - it fills the lumps and bumps and allows the van der waals forces to act. This is the same way the geckos can stick to most surfaces, they have lots of tiny hairs on their toes which increase the surface area and allow van der waals forces to act, sticking them to walls, windows, ceilings etc.
Other glues chemically bond to surfaces, actually making molecular connections to both surfaces.