Basically, you have to study music theory and apply it in your practice.
So not just learn some basic chords but actually try to find them in the pieces that you play.
Always start interpreting the chord from the bass up and make sure you understand if there are any doublings in a three-note chord.
Don't forget to find all modulations and temporary tonicizations.
Then you also have to study musical forms.
Think in periods.
Find the end of the first musical idea (generally 2 or 3 cadences). That's your period A.
Find where the next idea ends. That's period B.
See if period A repeats. That would be recapitulation.
If after periods A and B comes something entirely different and contrasting, then AB is a binary form. ABA - ternary.
That's a start. From here you can go to more advanced forms, such as compound binary or ternary, variations, rondo, sonata or their combinations.
Hope this helps.