In a Feistel cipher structure, what exactly does the "round function $F$" do to the right half of the data, before taking XOR of the output with the left half of the data?
What exactly does the "round function F" do
Pretty much anything it wants, with the proviso that it must be a deterministic function of the right hand data and the keying data; it cannot depend on the left hand data.
With that constraint, you get an easily invertible cipher structure, with the inverse function being essentially the same (except that you perform the various rounds in the opposite order; if you feed different subkeys into the various rounds, you invert that, and if you use different F functions for different rounds, you reverse the order of that as well).
Now, to get a secure and efficient cipher, well, that takes a bit more work...