Practically all the skills we handle as adults have been learned in a process that involves action, repetition, trial, error, adjustments, and more repetition.
Generally, learning a new activity requires a lot of our attention initially. As we repeat it, we automate some of its steps; we do not have to pay attention or think about each step; they just come out spontaneously. For example, let's think about when we learned to drive a car. In the beginning, we were very attentive to each step of the process: putting the gear shift, releasing the drunkenness, accelerating... When we already know how to drive, we can go from one place to another thinking about other things, talking or listening to the radio, and sometimes we are not even aware of where we are passing on the way. This activity has become automated, we don't have to think about it, and we even get to drive on "autopilot," that is, "with our mind on something else" while we are doing it.