This is a way to carefully ask a question that you're worried might be rude, but that you want to know anyway. For example, if you're visiting someone's nice apartment and you want to know if you could afford a similar one, you can ask:
This is a really nice place. Do you mind if I ask how much you pay per month?
The question that follows "Do you mind if I ask..." is in this format:
...what your ethnic background is? (What is your ethnic background?)
...how much you pay? (How much do you pay?)
...where you're from? (Where are you from?)