It doesn't get better with age, lol. My youngest 2 are homeschooled, and we had one of those days just yesterday. Everything went in one ear and out the other. And they really are GREAT kids. I feel bad punishing them because they really are just terrific and do so much to help and normally with such joy (I'm 33 weeks pregnant, so I need a lot of help lately).
I still at times have to go back to the methods I used when they were toddlers, I will go over to them make sure I'm eye level, have them look at me and explain what I am asking of them, then have them repeat it back to me.
I also make sure they understand their choices. Everything in life is a choice, some good some bad, not listening is a bad choice that means they will miss out on something they would enjoy or something they want. If they won't listen when I need something of them, I stop talking and don't suggest the fun things I have planned, after all why bother when they won't listen anyways (lol). choosing not to listen and do their lessons can mean a day of chores. We used to have a jar with little slips of paper and if they didn't listen or broke some other rule, they had to pull a slip. On the slip of paper was some tedious age appropriate chore. It's amazing how clean my house would get on those days, and having your second grader put their books in alphabetical order really teaches the alphabet.
All in all though, you said it, they are kids, it isn't all the time. Enjoy the good days and do the best you can with the bad.