Specifically, three years. This is because immediately prior to the verse in Leviticus that refers to not cutting the payos (the more usual English transliteration) is a passage which speaks about laws of fruits grown in Israel. Those laws are that the first three years that the tree produces fruit, that fruit is forbidden in any benefit, and then in the fourth year, the fruit is holy and must be eaten in the Temple vicinity. (from the fifth year onward, the fruit can be freely used) A kabalistic interpretation says there is a hidden allusion in those verses which indicates that until a child is three years old, he cannot effectively be trained in religious observance, but upon beginning his fourth year, he should be “made holy,” i.e., trained.
Since the first commandment that follows this allusion is to not cut the payos, it is traditional in many Jewish families (including my own) to not cut a boy’s hair for three years, and then on or around his third birthday, his hair is cut for the first time, but not the payos, thus making a show of fulfilling that commandment. Many of us make a large party on the occasion of the “upsherin” (Yiddish word meaning “cutting of hair” - or “shearing”, so to speak. Careful to choose a reputable barber who won’t rip you off…don’t want to get fleeced! :)) and decorate a Hebrew book of some sort (these days, usually a laminated Aleph-Bais poster) with honey and have the child lick the honey off the letters, introducing him to the sweetness of Torah study and observance.