I’m trying to understand how learning works by trying to understand how my daughter learns things. Explaining it as pattern recognition makes sense. Patterns are recognized, and each time that happens they can be reinforced/strengthened or weakened (or maybe just reinforced). As she has grown older, it’s clear that patterns can be “wider”, they can span larger contexts of space and time.
New patterns of action are created by either randomly trying anything she can think of, or by copying what she sees others do. As she does things, the actions are … oh, got to go.