Some movies feature child characters put in violent situations. This can range from crude language to extreme horror e.g. torture, gore, etc. For example, child’s play and its sequel has plenty of those scenes. It looks like a paradox that children can be actors in movies that are definitely not for children.
Movies are pictures taken with a camera. Children are usually not exposed to horrific scenes. They are exposed to things that will give the director the end result he needs and everything is spliced together to look horrific to the audience. For example in Close Encounters of the Third Kind the delighted look on the face of the child when he sees the alien ship land was actually provoked by an actor dressed as the Easter Bunny. Movies are not filmed plays. A director films a lot of different pictures and edits them together to tell a story. Actors in a movie do not necessarily know the story nor is it usually shot sequentially. If you want any actor to be upset, indignant, furious, lustful, sad etc you give your actors stimulus to behave the way you want and you film it. Often this stimulus has nothing to do with the story of the movie.
The child actors are not exposed to horrific scenes as it is often believed by people.
Even before anything is filmed, the child actors are gathered together, and they are told what the film entails in case they don’t understand the script for some reason. The majority are film veterans, even at a young age, and so they are well-aware that the film is fake and that no harm will come to them on the set. In more modern films, where there’s plenty of CGI, the child actor will never see most disturbing scenes until AFTER the film is finished, or nearly so, as they have to be added later. Basically they respond to a green screen or another actor in a motion capture suit and there’s not much “scary” about that. Additionally, because of the limited hours that child actors can work in Hollywood, they film mostly in the daytime, and they are rarely working after sunset. In fact, if you look at most modern films, the scenes with child actors which are supposed to be set at night, are nearly always indoors, meaning that they were likely filmed on a soundstage and the lighting was adjusted to simulate external darkness. The few scenes which are filmed at night rarely have the child performer in them for long as again, strict work rules prevent child actors from being used in the same manner as adult actors.