What is correct, between
(a) Ich lerne schwimmen.
(b) Ich lerne zu schwimmen.
or both? If both are correct, is there a difference in meaning?
Well, actually both are correct and there is no difference in meaning. You sometimes have a "longer" and a "shorter" form of stating the same thing. However, this also depends on whether you use it in everyday's spoken or written language.
As far as your example goes there could be a difference in grammar.
This would mean that you are using the noun "Schwimmen" here (optionally with its article "das"). It would mean exactly the same but you are using the noun form of the verb swim (Substantiviertes Verb).
What you are using here is the Infinitive with "zu" combination. You combine a verb with "zu."
Still, as far as I know, you can also use
which would be the verb's Infinitive.
Hope that helps.