When a child stops breathin in their sleep, what is the cause of it?

Sleep apnea. Children with sleep apnea, disordered breathing and/or signficant snoring need to be evaluated, usually by ENT for upper airway obstruction.
Many things. The age of the child is important here, as well as the frequency and how long they stop breathing. Erratic breathing during sleep is normal for all of us. If the child is older, and snores, then it is most likely enlarged tonsils or adenoids, or allergies. Either way, if you notice a child stop breathing during sleep for > 5 seconds, you should have the child evaluated by a medical professional.