Give one region a little more gas
Picture a patch of gas with a slightly crowded middle and a slightly emptier edge. Density measures how much matter occupies the same volume. The crowded region attracts nearby gas. If some gas flows in, the region becomes denser and can attract more. Gravity has a way to strengthen the change that started the motion.
Gas also resists compression. Moving particles transfer momentum through collisions, producing pressure. When a region becomes denser at the same temperature, its pressure rises. It pushes on its surroundings, opposing the inward flow. Both effects act on the same gas at the same time.
Uniform pressure does not select a direction for the whole patch to move. Equal pushes from opposite sides cancel. A region accelerates when one side pushes harder than the other. This difference in pressure is the part that competes with gravity.
Reading: Molecular-cloud Jeans standalone scientific reproduction
A pressure disturbance takes time to cross a region
Sound takes time to cross a room. A compression in a cloud also passes its push from one neighboring region to the next. The speed of a small pressure disturbance is the sound speed. At fixed gas composition, colder thermal motions usually mean a lower sound speed.
A narrow compressed region can communicate across itself quickly. Its sides push back, gas spreads out, and inertia may carry the motion into a rebound. Across a much broader region, that communication takes longer. Gravity can amplify the inward motion during the wait.
The Jeans length is the critical scale in a simple version of this problem. Start with a tiny wave of density in an otherwise uniform gas. A wavelength shorter than the Jeans length oscillates under pressure. A longer wavelength can grow under self-gravity. The quantity being compared is the wavelength of the ripple; a spherical mass requires a separate definition.
Reading: Chandrasekhar & Fermi 1953, Problems of Gravitational Stability in the Presence of a Magnetic Field · Molecular-cloud Jeans standalone scientific reproduction
Change the gas and watch the same ripple respond
In the stronger-pressure example, the initial density peak gets lower as gas moves away. The gas has inertia, so the center can briefly become less dense than average before it fills again. A history of density reveals the rebound more clearly than a single image.
Lower the sound speed while keeping the initial ripple fixed. Pressure now communicates more slowly. The central density can grow, and the velocity arrows increasingly point toward the gathering gas. A brighter patch in the density picture means more gas in each volume.
Here is a prediction you can test. Suppose the ripple has a wavelength of one and a half Jeans lengths. Double only the sound speed. The Jeans length doubles too, and the same ripple becomes three quarters of the new critical length. It moves from the growing side to the oscillating side even though its initial position has stayed the same.
A different experiment changes the mean density. Keep the sound speed fixed and make the gas four times as dense. The Jeans length halves. Stronger self-gravity can amplify a smaller ripple. These two changes affect different physical quantities, but both can move the gas between rebound and growth.

Reading: Molecular-cloud Jeans standalone scientific reproduction
A dense patch of gas has more physics ahead of it
Real molecular clouds contain flows and magnetic fields. Heating can change the temperature during compression. Stars that have already formed can heat nearby material and drive outflows. Those processes help determine how much mass eventually joins a star.
The simple ripple isolates an earlier question: when can pressure reverse a compression, and when does gravity amplify it? The numerical examples follow gas until a specified time or a resolution stop. Their bright concentrations remain gas density; turning them into stellar masses requires a larger physical model.
Reading: Guszejnov et al. 2020, Can magnetized turbulence set the mass scale of stars? arXiv:2002.01421v1 · Federrath & Klessen 2012, arXiv:1209.2856v1
Turn the picture into a prediction
The useful step is to replace a vague statement about cold clouds with three specified quantities: mean density, sound speed and ripple wavelength. They give a prediction for how the density should change with time. Short and long waves can then be compared on the same footing.
That comparison also gives you a way to ask better questions about added physics. Magnetic forces have directions. An inward flow does not automatically provide an extra outward pressure. Each proposed support must enter an equation for how the gas moves.
The next chapter works through the simplest wave. It also explains a subtle feature of the first few moments: an unstable ripple starting at rest has zero initial slope before growth develops.
Reading: Chandrasekhar & Fermi 1953, Problems of Gravitational Stability in the Presence of a Magnetic Field · Molecular-cloud Jeans standalone scientific reproduction