Plenty of parents are going to answer this question with a wide array of answers. There is NO right answer. I personally use the 1,2,3 magic technique. There is a book on it, we have been using it on our son since he was 12 months. Good luck.
When my kids were that age I would drop yellow chips in a glass container for bad behavior, blue chips in a different container for good behavior. So they could visualize which one had more. After 5 blue chips they could have a little toy, after 5 yellow they would have a punishement such as no TV.
The idea is to give them time to redeem themselves and also to reward them for good behavior!