The evaporation of a liquid
The average energy of the particles in a liquid is
governed by the temperature. The higher the temperature, the higher the average energy. But within that average, some particles
have energies higher than the average, and others have energies lower than the average.
Some of the more energetic particles on the surface of the
liquid can be moving fast enough to escape from the attractive forces holding the liquid together. They evaporate.
The diagram shows a small region of a liquid near its surface.

Notice that evaporation only takes place on the surface of
the liquid. That's quite different from boiling which happens when there is enough energy to disrupt the attractive forces
throughout the liquid. That's why, if you look at boiling water, you see bubbles of gas being formed all the way through the
liquid.
If you look at water which is just evaporating in the sun,
you don't see any bubbles. Water molecules are simply breaking away from the surface layer.
Eventually, the water will all evaporate in this way. The
energy which is lost as the particles evaporate is replaced from the surroundings. As the molecules in the water jostle with
each other, new molecules will gain enough energy to escape from the surface.
The evaporation of a liquid in a closed container
Now imagine what happens if the liquid is in a closed container.
Common sense tells you that water in a sealed bottle doesn't seem to evaporate - or at least, it doesn't disappear over time.
But there is constant evaporation from the surface.
Particles continue to break away from the surface of the liquid - but this time they are trapped in the space above the liquid.

As the gaseous particles bounce around, some of them will
hit the surface of the liquid again, and be trapped there. There will rapidly be an equilibrium set up in which the number
of particles leaving the surface is exactly balanced by the number rejoining it.

In this equilibrium, there will be a fixed number of the gaseous
particles in the space above the liquid.
When these particles hit the walls of the container, they
exert a pressure. This pressure is called the saturated vapour pressure (also known as saturation vapour pressure)
of the liquid.