"Counter hit" basically means that you landed a hit in the short moment after your opponent pressed a button, but before their attack is able to hit (i.e. if an attack takes 10 frames between "pushed button" and "can actually hit," if you hit them during frames 1–9 of their attack).
There are tricks called "frame traps" where you use an attack that leaves yourself able to do something new sooner than the opponent can ("frame advantage"), leaving just enough space for the opponent to try pushing a button to counterattack, but you've already pressed a button to punish it (with a counter-hit!) because you expected them to do that.
But yeah, counter hits aren't a super intuitive concept, so don't beat yourself up if it's taking a little while to grasp what they're all about!