A water molecule can absorb infrared radiation. Thus, water vapor can do the same. That makes it a greenhouse gas. Note that radiation that is absorbed will eventually be re-emitted. This occurs in a random direction, which is ultimately responsible for the greenhouse effect:
Heat radiation that would otherwise leave earth into outer space is absorbed and then a part of it is emitted back to earth.
The statement that water molecules are not a greenhouse gas, in the way it is presented in your short excerpt, strikes me as wrong. Both water vapor and individual water molecules absorb and emit infrared radiation.
Liquid water turns out to have a different absorption spectrum, because there certain vibrations of the water molecule are suppressed due to the bonding between individual molecules.
The claim that water just takes the eat and then does not re-emit also strikes me as bogus; if that was the case, water would get hotter and hotter and hotter, whereas in thermal equilibrium, the rate of absorption and emission must be in balance. Of course, when cold water is introduced into an otherwise warm atmosphere, the atmosphere will heat the water and cool in that process. However, the water heated in that way will still radiate in the infrared...
Molecules don't know. Consider the following reaction as a template for some reaction that is favored to go in the direction indicated.
\begin{align*}
A-B +C \rightarrow A-C +B
\end{align*}
In a large collection of such molecules you can always find some $AB$ going to $AC$ and some going backwards. It is just that significantly more $AB$ are going to $AC$ so you when you look into your beaker (system/experiment) you see that you are forming $AC$.
Next question is why or when is $AC$ preferred?
The process of the reaction is such that $AB$ is flying around doing its thing when $C$ smacks into with enough energy to form a transient state $B-A-C$. Now from this state it can forward $AC+B$ or go back to $AB+C$. This is the highest energy state and all the energy is jostling between these two "bonds" (interaction might be a better word). This state is called the transition state. For any particular set of molecules in your beaker (a large number ~Avogadro number) the path forward or backward has to go through this transition state.
Think of what it takes to get to the transition for any set of molecules. In going from $AB$ to $BAC$ it requires the $C$ to come in with kinetic energy that is the energy difference between the energy of $BAC$ and $AB$. Similarly to go from $AC$ tp $BAC$ it requires a $B$ to come in with kinetic energy that is the difference in the energy of $AC$ and $BAC$. It is now intuitive that if $AC$ has significantly lower energy than $AB$ it is less likely to find a higher kinetic energy $B$ than $AB$ finding a relatively less energetic $C$. This is why if $AC$ is the significantly lower energy product, i.e., the reaction above is exothermic the forward direction is preferred.
Caution: I have been a little sloppy in my explanation. Because there are many many particles in the system, many other reactions are possible, e.g., $AC$ splitting itself apart into $A$ and $C$, $C$ not hitting $AB$ from the $A$ side and forming $A-B-C$ instead of $B-A-C$ in which case it cannot form $AC$ it can only form $A+BC$ etc. All this is part of what defines the chemical kinetics of the system. Furthermore the fact that there are many instances of these reactions happening simultaneously, one can study this system using statistical means. This is what is done when one says "thermodynamically" the free energy $\Delta G$ is minimized in the reaction. I saw that people have given you that explanation in Chemistry so I will not reproduce it here.
Summary: A stable product is the one energetically favored or more precisely "free" energetically favored (lowest free energy). But molecules are going either way they don' know. More of them going the right way succeed! The ones that went wrong way eventually bump into guys that are going the right way are are forced to make a U turn.
Best Answer
The water molecule is neutral on overall basis, i.e: the water molecule as a whole has no net charge.
The water molecule is not linear rather it has a bent shape with two hydrogens on the same side. This happens because of the lone-pair-bond-pair repulsions.
The oxygen has is a more electronegative element than hydrogen, i.e: oxygen has high electron-attracting power. Therefore, it attracts the bond pair electrons towards itself which gives a partial negative charge to the oxygen and a partial positive charge to the hydrogen. This gives a possibility of the positive part of a molecule being attracted towards the negative part of another molecule. This is how water molecules attract each other. The bonds formed between the hydrogens and the oxygen are termed as hydrogen bonds and these are quite strong bonds which is why water with very low molecular mass has unusually high melting and boiling boint.
As a matter of fact, even molecules with zero dipole moment can also attract each other. There exists weak Van der Waals forces (London Dispersion Forces) which are caused by induced dipoles. This is responsible for helium to to stay in liquid form at 4K.
London Dispersion Force - Induced Dipole Forces