OK, my German friend asked me this the other day and I couldn't give her an answer! Native English speaker for 27 years and it's still hard for me, ha-ha.
Do you like to walk?
Do you like walking?
What is correct? Are they both correct?
Obviously we can substitute 'walk' for many other verbs, so is there a rule here or something?