It's far easier than you think, conceptually.
First, of course, you are only ever on ONE radial. Say you're directly north of the station. You are on the 360 radial. The receiver is able to figure that out. It's internal phase comparison results in one and only one result, the 360 radial.
So if you spin the OBS around to 360, it shows FROM, meaning that's the radial you are on. If instead, you spin the OBS to 180, that is the opposite of the radial you are on, so it shows TO.
The receiver itself doesn't know anything about which way you're going or which way you want to go. It just shows the radial you're on with a FROM if you have it dialed in, or a TO if you've set the opposite.
It may be easier to think about if you realize that, electronically, ALL radials are FROM the VOR. The whole TO thing is just a concession to humans brains to ease navigation.