When they reach the age of reason which is about seven, some mature earlier
and others mature latter.
When they can clearly distinguished between right and wrong.
So many people whom are intelligent are creatures of influence,
and if they started out on a wrong path, and know it is wrong.
They just follow the leader just out of human respect.
In the spiritual book, "The Way of Divine Love" a 10 year old
girl was sent to hell in the 1920's for reading bad books.
Unbaptized Children whom die before the age of reason go to a place
called Limbo. They are separated from God, and because they
were guilty of no willful personal sin, they are happy in their
state.
Children that have reached the age of reason, that have not been
baptized have a duty to get baptized. This is why they need to have
a good Catholic friend that will lead him to a Holy Priest.