This is very idiomatic. The two phrases (or, more accurately, the two words: rather and instead) are used to accomplish the same thing: to suggest a preferred alternative. And yes, they can be substituted one for the other (with appropriate adjustments to the rest of the sentence). But there are times when that might sound awkward.
Would you like some tea?
Thank you, but I'd rather have water.
Becomes...
Would you like some tea?
Thank you, but I'd like water instead [of tea].
I'm from the western U.S. To me the second of my examples sounds awkward. I'd expect to hear the first example instead.
And you just saw a reasonable use of "instead" (or, "instead of the second example"). If I convert it to "rather," I get:
I'd rather hear the first example.
How to use "rather" and "instead" is, therefore, not an easy explanation (and that explanation will change depending on where each English speaker lives). You cannot directly replace one for the other. You need to adjust the sentence to accommodate the word you prefer.