In most cases, toddlers begin "masturbating" (I put it in quotes because it's the technical and clinical definition of masturbation but the child isn't aware they are doing it for physical release, they just know it doesn't suck) around two to three years old. This is also when a child is typically shamed into never touching their private parts again, at least not when other people are around. This then delays further exploration and attention to the area until an accidental brush against the genitals leads to pleasure and the curiosity begins anew (usually around 10 to 14 years of age).
The above is the answer you would get from a doctor or therapist concerned with these matters. The truth is, it depends on the child, the level of privacy maintained in the home and how their parents reacted to the discovery that touching the genitals in a certain way or pattern produces ecstasy (and orgasm).
The first time I intentionally, with all thoughts correctly geared to producing an orgasm, masturbated I was seven years old. There are circumstances that lead me down this road a little earlier than average, but that's the first time I can recall clearly.