Hair colour is produced by cells known as melanocytes, which move into the hair bulb as the hair follicles develop. They produce the pigment that's incorporated in growing hair fibres (strands of hair).
Hair colour depends on the presence and ratios of two groups of pigments - black and brown, and red and yellow. Hair colour also varies across the body, for example eyelashes are the darkest because they have high levels of the black and brown pigment.
As we get older, hair loses colour and turns grey.