You just do it. You want to develop a certain set of skills which are useful in the sense that, when solving problems you always ask yourself
– why am I doing this?
– what happens without this assumption?
– what happens with this assumption?
– why does method work for a finite case but an infinite?
– where have I seen similar structures as this?
and so on. It's a skill really, took me 3 years to get somewhat good at it.