Answer: at first, a child's morality is externally controlled by adults.
Freud believed that young children form a conscience by identifying with the same-sex parent. Then, they adopt their same moral standards. He believed moral development was then largely complete by age 5 or 6.
Most researchers now disagree with this view, and they instead believe that fear of punishment and loss of love motivate moral behaviour in children. Therefore, children's morality is largely externally controlled by adults.