Hiya. Well, it's like this...
If I say "I love to dance" it means I am the person who dances. 100%.
If I say "I love dancing" it could mean I'm the person who dances **OR** it could mean that I like to watch other people dancing.
For example, we could say "I love ballet dancing. I like to go to the theatre and watch it -- but I can't do it myself."
Updated
If "She loves dancing" is used for "She loves to watch dancing," then there is a difference between "She loves to dance" and "She loves (to watch) dancing."
If "She loves dancing" is used for "She loves to go dancing," then there is no difference between "She loves to dance" and "She loves (to go) dancing."
Original text
Structurally, one uses an infinitive (She loves TO DANCE) and the other uses a gerund (She loves DANCING). A gerund looks like a present participle (verb+ "ing") but functions as a noun.
Examples:
Exercise is good for you. (Exercise = noun)
Exercising is good for you. (Exercising = gerund which functions as a noun)
More information:
https://www.ef.com/english-resources/english-grammar/gerund/
https://www.ef.com/english-resources/english-grammar/ing-forms/
There is a difference in meaning. Kerry is correct.
I like to swim. = I like moving my arms around in the water so that I can move from point A to point B.
I like swimming = People will say this to mean the same thing as "I like to swim." However, it could also mean that you like watching the swimming competitions on the television, but you never actually get into the water. You sit on your couch and eat popcorn.