I'm afraid that you need to go through some basic MatLab course to get more knowledge about fundamental MatLab definitions.
>>What does
,:,1 or 2) means? Why is it 1 or 2?
The imported into HSV is a 3 dimentional array (X - Y for the image and Z for the H, S, V). Colons
) are used to denote all elements from X and Y,
You access different parts of the color vector and create a new variables (2 dimensional) which shows how this color component is spreaded accross the image. If the conversion is Hue/Saturation/Value then index 1 will bring you the Hue and index 2 - the Saturation. Value (sometimes called brightness) in your case doesn't matter.
The color (or as they call it Hue) range - when colors are represented as HSV it's very easy to define the face color simply with 2 digits - the low and the high boundary, so you simply filter all pixels which fulfil this criteria - color is bigger or less than some values
The same is with saturation - in HSV the tone of the skin can be only valid in some range