You will find that even small children (around the age of 4-5) discover that some parts of their bodies are different from those of the opposite sex. They may pass casual remarks about it, which is done mostly because they find the difference funny. Real curiosity about sexual organs may start setting in pre-puberty. Start talking to your child about sex-related issues when they show interest to know about them. A young child might want to know the difference in body parts between girls and boys, which is also a part of sex education. As they become emotionally and physically mature, your content and the way you say things to them will have to modify.
Each child will have curiosity at different ages but mostly roundabout puberty this gets prominent. The age, physical and emotional growth of your child should be the parameter to keep a tab on. It is important that your child understands everything about sex before they become completely mature physically. This is more to keep them safe and healthy and avoid any unpleasant or “before time” sexual experiences.