Practice it. If you listen to the podcast episodes with Dave Thomas, he makes good points about it. It's how people attain mastery in karate, by repeating exercises jntil they become trivial. So solve some seemingly simple problems and learn from it. Try different things, and see what works.
As for exercises, there are project euler problems you can look up. You can look at the table of contents for Exercises for Programmers over a Prabmatic Publishers and take ideas from that. Exercism.io is also another option. I'm sure many will be provided.