Try to scold them immediately after they do something bad so they're able to associate punishment with the action. Simply tell them no in a firm voice and try to correct their behavior.