That is a striking statement that at first glance might seem almost heretical - if it weren't right out of Hebrews 5. "Although he was a son, he learned obedience through what he suffered" (Heb 5:8, ESV). What does that mean?
The first statement to make is that Jesus wasn't moving from disobedience towards obedience. He was always innocent and never disobedient. But, as one commentary puts it, "innocence differs from virtue". Innocence is to be zereod out on the merit/demerit scale. Sin is to be on the negative side, but virtue is on the positive side. As Jesus grew and learned, he grew consistenty in virtue, having always been perfect in innocence.
Another helpful thought to consider is that prior to actually going through the suffering he suffered, his obedience to the Father's plan was only hypothetical. He was willing to obey, but by actually acting, he obeyed.
Third, you could think of this as a baseball player learning how to hita curve ball. How do they learn - by actually doing it! How do we learn obedience - by actually obeying - not by disobeying. We learn the consequence of disobedience by disobeying and the value of obedience by disobeying, but the only way we can learn to obey is by obeying. It's important to know that Jesus never learned from his mistakes (sinful ones), but learned by doing righteousness.
Thinking about this since I was asked two weeks ago has reminded me how much good intentions must give way to actions. We are all very willing to obey, but what about when it comes time to act. Are we learning obedience by being obedience, or just bidding our time.