You should use "daw" when the word it follows ends with a consonant.
You should use "raw" when the word it follows ends with a vowel (including Y and W)
Halimbawa | Example:
Madali raw mag-aral ng Tagalog. | They said (-or- According to them), it is easy to study Tagalog.
Mahirap daw mag-aral ng Tagalog. | They said (-or- According to them), it is difficult to study Tagalog.
This also applies to other similar words like: din/rin, dito/rito, doon/roon