The way I tough it to my students:
"If you flew the same track as the course you selected in the OBS, would you be flying TOwards the VOR or away FROM it? That is the answer the OBI gives to you in the form of a TO or FM flag."
For instance if you are in a radial south east of the VOR and select the 360º course, the OBI will show a TO flag, because if you fly with a north heading, you will ge closer and closer to the VOR. Until reaching the 090 radial, at which point the flag would change to FM, because then you would be flying away from the VOR.
The same logic can be used for the CDI.