You pick it up through immersion over time. If you study it deliberately, it's difficult.
Kansai-ben is not so different from Standard Japanese. Most differences come down to surface-level things like sentence endings and suffixes. Pitch accent is pretty different, but you don't have to learn Keihan accent to understand it. If you want to learn to speak it, that's where you have to learn a lot.
In almost every anime or drama there's a character that speaks the dialect. The amount of exposure you get is significant enough to learn to understand it through exposure alone.