- "I like to eat fast food"
- "i like eating fast food"
1 is correct. 2 should have capitalized the I. Other then that minor typo 2 is fine. They mean the same thing. They just say it a different way.
As Buzz Lightyear never said, "To infinitive, and gerund!"