Both of course, but as a life-long musician, listening / reading / getting input is the first and most important step.
If someone has never heard a guitar before, and you hand them one, they'll have no basis for how or what to play. Instead how people learn, is they listen, then imitate, just like language. Mastery comes not through try / fail / correction, but through listening then playing a lot of different music, so that it becomes completely internalized and occurs without active thought. They call this the suzuki method, and its much preferred nowadays over the traditional method of memorizing scales, the circle of fifths, , which I unfortunately wasted years of my early music learning through.
After playing jazz for a few years now, I couldn't even imagine how skinner's method would work for that. Jazz is too complicated to think about or logic your way through, just like language.