I like playing football or I like to play football?
I learnt in English that after some verbs like love and like you have to use the gerund form of the verb (I like playing football). However I've seen some people using the verbs in infinitive form (I like to play football). I want to know if both are correct. If it isn't, which is the correct form?
Thank you for your answers!