People are not required to observe commandments until they become bar/bat mitzvah. But to what extent should the parents enforce halacha on them? If they write on Shabbat, stop them? If they scream bloody murder because they want a glass of milk shortly after a meat meal, let them scream? If they play with an electric toy on Shabbat, confiscate the toy (note: the toy is muktzeh!) What is the extent of required enforcement?
It all depends on the age of the children. The older they become, the more we teach them about positive and negative commandments. To start from a practical example, SA OC 616:2 writes about training children to fast on Yom Kippur (summary from dailyhalacha.com)
The Shulhan Aruch rules that children under the age of 9 should not fast at all on Yom Kippur. Below age 9, according to Maran, there is no concept of Hinuch (training in Misvot) with regard to fasting on Yom Kippur, and thus these children should be fed on Yom Kippur just as they are on any other day of the year. Once a child reaches age 9, the Shulhan Aruch then writes, he or she should be trained to fast for a brief period of time. For example, if a child normally eats breakfast at 8am, on Yom Kippur he should be fed around an hour later, at 9am, so he begins training to fast on Yom Kippur. If the child is weak and it is important for him or her to eat at the regular time, the Shulhan Aruch adds, then the training should begin a year later, when the child is ready.
The Shulhan Aruch then rules that once a boy or girl reaches the age of 11, he or she is required Mi’de’rabbanan (on the level of Rabbinic enactment) to observe the Yom Kippur fast and fast the entire day. (Ashkenazim follow a more lenient view, and maintain that youngsters should begin observing the full fast later.)
These rules can change over time based on the evolution of children (see here for a modern take on the rules above).
More generally, as R Shraga Simmons writes
However, in order that children are properly trained to perform the mitzvot when they reach the age of obligation, parents must accustom them at an earlier age. This is a rabbinic mitzvah known as chinuch.
You ask about negative mitzvot
Once a child can comprehend that a particular act is forbidden, the parents should teach the child to refrain from the action. This stage typically occurs at age 4.
Similarly, a parent must restrain a young child from violating a mitzvah. For example, if a mother observes her toddler taking a crayon to draw on Shabbat, she should stop him from doing so. Or if a father hears his daughter speaking lashon hara, he must gently correct her behavior.
It is forbidden to give a child (of any age) something that will cause him to violate a commandment. For example, one may not feed non-kosher food even to an infant.
See there at length for positive mitzvot, further advice and sources.