I saw it explained on another post that 'yn' is 'to' but can also be a link to the verb, much as we say "I'm going to make breakfast". The 'to' doesn't really do anything but needs to be there for the sentence to be grammatically correct.
yn when it is used as a preposition means 'in' rather than 'to'.
In this sentence, though, it is not used as a preposition but as a particle to link dw i ddim (I am not) with the verb-noun hoffi (liking, to like).
Using yn as the linking particle in front of hoffi shows the the 'liking' is or was a continuing or incomplete action - it does not actually translate into English as a word at all when it is used like that. So dw i ddim yn hoffi translates as 'I don't like' (literally it would be 'I am not liking', but that is awkward English).
More of an explanation here
Using a preposition for continuous/incomplete tense is not unique to Welsh (not that you said it was); Dutch uses aan het, literally meaning "on the", "at the" or "in the". E.g. "Ik ben aan het koken een koek" – "I'm cooking a cake", literally "I am on/at/in the cooking a cake" (see http://www.dutchgrammar.com/en/?n=Verbs.Ot02)
EDIT: Also, the English continuous tense developed from the same thing as the Dutch one. Originally "I am singing" would be "I am on singing", then it was "I am a-singing" (hence Twelve Days of Christmas Lyrics), which became "I am singing".
What does duolingo have against breakfast? What did it ever do to them? ;-;