It is unanimously agreed upon among scholars that Salah is obligatory upon Muslims and that Muslim parents are to order their children when they are seven years old to perform it, but if the children have reached ten years old without observing Salah, their parents are to beat them for that. Beating in that case is to be with the hand, not a harmful instrument. There is a Hadith to that effect: "Order your children to perform Salah when they are seven years old, and beat them (if they have neglected it) when reaching ten years old. And separate between your male and female children in bed."
Allah said: “Had We sent down this Quran on a mountain, you would surely have seen it humbling itself and rendering asunder by the fear of Allah.” (Quran 59:21)