Give them progressively harder programming problems to solve. Each new problem should be just baaaarely within their capability to solve, so they are forced to learn something new with each new problem. Each new problem should also 1) build on the foundations of the previous problem, and 2) introduce new fundamental concepts.
I know of no other way. You learn programming by programming. This, by the way, is exactly what a good CS curriculum will do.
I know of no other way. You learn programming by programming. This, by the way, is exactly what a good CS curriculum will do.