I am not a native speaker of English and I was having a casual conversation with my friends in the US. I asked them, “Where do you stay?” (which is pretty common in India, as far as I know) for which they gave me a surprised look and told me that people generally don’t use the word “stay” and instead the same question will be asked as, “where do you live?”.
If I use the word stay, is that offensive or is it just uncommon? What’s the major difference between the two usages?
It’s just uncommon. Uncommon enough to be confusing, and so worth avoiding, unless you are operating in a dialect where it is normal.
The word would be "live" in US English, Canadian English and English English, but not Scottish English which also uses "stay" (which is why I said English English before).
Where "live" is used for long term residence, "stay" normally implies a short term visit. If you ask a visitor "where do you stay" they will probably give you the name of their hotel (while thinking you had made a grammatical mistake).