"Dw i'n hoffi Megan."
Translation:I like Megan.
In school we used to use 'Dwi'n' more than 'Dw i'n' but we also used 'Rydw i'n' in some contexts. My teacher told me there were differences between north and south dialects too with spelling?
It doesn't have a meaning as such, only a grammatical function.
It's a bit like asking what the "to" means in "I want to swim" -- it just connects the "want" and the "swim", and here, the "yn" connects the "to be" verb (e.g. "dw i, dach chi, mae e, ...") with the main verb (e.g. "hoffi, bwyta, yfed, ...").
"Dw i" and "Dwi" are both the same thing. Most younger people use the "dwi" variant whilst older people and people who have learned through courses are more likely to use "Dw i". They both come from the formal "Rydw i" which first became "Dw i" and now "Dwi" as one word.
They are separate words, at least in origin.
I imagine it's like how "I am" (two words, two syllables) turns into "I'm" (one syllable) in English. Not sure whether to count that as one word or two: there are no spaces, but the apostrophe marks the original break.
Similarly "Dw i" might be pronounced "Dwi" and then later spelled that way.
In 1900/1901 in the United States when "I am" started to change to "I'm" you can see in literature at that time that they would write it as "I 'm" with a space between the "I" and the "m". It was only a year later that novels started writing it as "I'm" without the space. So it makes sense that this has happened in Welsh. I almost want to blame Celtic peoples for our contractions in English since both Irish and Welsh are notorious for them in their languages.