The diastereomerism is the -cis, -trans configuration of molecule.
The R-, S- nomenclature is used to define the aerial position of the functional groups present in a chiral center (the -C molecule at which the four functional groups present around are different) of a molecule. In 2, 4- hexanediol there are two chiral center where the alcohol groups (-OH) are present.
Now the rotation of the stereo centers are analysed by the priority of the functional group. In 2, 4-hexanediol at 2, 4 position the four substituents are -OH, -H, -CH₃ and -C₄H₉O. The priority of the oxygen atom is always to be taken as 1st then -C₄H₉O.
The priority of the group can be shown as -OH > -C₄H₉O > -CH₃ > -H. Thus the rotation will be from -OH to -H which is clockwise. The clockwise rotation is designated as -R configuration but if the -H atom is placed at the horizontal position as present in the figure the configuration will be -S.
Thus the two possible diastereomers of the compound is shown in the figure.