No, we don't learn them. When it comes to the use of infinitives and gerunds, there are no rules, so there is nothing to be 'taught', as such. As small children, we hear and copy. Native speakers know intuitively what sounds right and what sounds wrong.
The average native speaker wouldn't be able to tell you why they say 'want to do' but 'like doing' any better than they could say why they put their left foot in front of their right foot when they are walking! That's just how it is. The patterns of language are instinctive, and nobody thinks about it.