Remember, the loop of Henle has a descending and an ascending limb.
The descending limb is permeable to water but not to salts (both thick and thin part). Therefore, the water can go out of the limb as it flows down the limb while the salts remain in the pre-urine.
The water flows out of the descending limb, because the tissue outside the limb (= the interstitial space) is increasingly hypertonic (as we shall see very soon).
Therefore, the pre-urine inside the descending loop becomes more and more concentrated; its osmolality increases.
In the thick ascending limb however, the wall of the loop of Henle is NOT permeable to water and the cells actively pump salt out of the pre-urine (Na+, K+, Cl-). Therefore, the osmolality of the pre-urine decreases again while flowing up in the ascending limb.
The osmolality level of the pre-urine at the end of the ascending limb can even become a little bit lower than it was at the beginning of the descending limb! (200 instead of 300 mOsm).
SO, because salt is being transported out of the ascending loop, the interstitial fluid becomes more osmotic, and that will attract water from the descending limb!
This is called a counter-current system; the pre-urine flows in opposite directions in the two adjacent limbs (downwards in the descending limb and upwards in the ascending limb).
But, if the osmolality of the pre-urine at the end of the ascending limb is equal to or even lower than that at the beginning of the loop, what then is the POINT of all this?
The whole point is that with this counter-current system, an osmotic gradient is created in the adjacent interstitium.
As you go down the descending limb, the pre-urine and the neighbouring interstitial fluid gets more concentrated.
And, as you go up again, the pre-urine and its neighbourhood become less concentrated.
In other words, because of the workings of the loop, the interstitium is getting more concentrated down the loop deeper into the medulla and less concentrated closer to the cortex.
So, this is purpose of the loop of Henle; to create an osmotic gradient in the interstitium of the medulla, from the cortex down to the papilla. Why? Watch what happens at the collecting ducts! (link).
Some teachers then confuse things with the vasa recta. Indeed its role is important but NOT in the creation of the medullary osmotic gradient!
As always, blood is required to provide oxygen and nutrients to all cells and this is also true for the cells in the kidney medulla. And a network of capillaries as usual, provides for this blood.
All these capillaries together run along the loop of Henle, called the vasa recta (which is maybe a strange name as this is a loop and not a straight vessel (=recta!). Well, ok, two recta’s, one up and one down ;-))
Now, if these capillaries had been normal, then the blood would immediately take up all the excess salt in the medulla, take it away from the kidney and destroy the osmotic gradient!
What is so special about these vasa recta vessels is that the blood flow is very slow (= sluggish).
Because of this slow blood flow, NaCl will easily flow from the interstitium into the descending blood but will also easily leave the blood in the ascending blood. There is therefore a constant equilibrium between the blood and the local interstitium.
In other words, the osmolality of the blood at the end of the vasa recta is the same as at the beginning of the descending limb.
No salt is lost to the blood and the medullary osmotic gradient remains intact!