But Snape never gave him any explanation for what he was supposed to do.
Contrast the scenes where Lupin teaches Harry Expecto Patronum and the occlumency scenes.
I don’t think Snape was really a very good teacher.
Good points. I don't mean to criticize Rowling (who wasn't writing an education manual), but a lot of the teaching was on the order of "Transformation means changing one thing into another. Now, everyone partner up and give it a try!"
Lupin actually tried to teach. Most of the other classroom scenes didn't show so much effort in this area. But it would have been boring and pointless if they had.
I think he did but Harry didn’t want to pay attention. Contrast how Harry behaves in those lessons and learning from Lupin, when Harry had problems with the Patronum he turned it inward felt he was doing something wrong and Lupin encouraged him, when he had problems with Occlumency he turned it outwards blaming Snape. It’s hard to teach someone who blames you for every misstep.
Harry didn’t want to learn occlumency. Period. He wanted to see what was behind the door.
The only person that could have taught him occlumency imo, would have been Dumbledore. Dumbledore admitted it was his mistake for not telling Harry why it was so important to learn it because of what he feared Voldemort might try to do (which V consequently did do.)