What is the difference between 'What are you?' and 'What do you do?' in the job meaning?
How to sense this difference if I need to ask about profession?
I meet a lot of people who are on holiday. I generally ask first where they come from, and then ask "What do you do there?". If somebody then says "I'm a doctor", I could then say "What kind of doctor are you?"
So, those are your two questions, but each needs a little more context to make it clear what exactly you are asking for.
Note that you can't ask somebody what is their profession: tradesmen, housewives, students, etc might be offended.
What are you?
seems somewhat vague, or even insulting, to me, out of context. How would one answer that? "I'm 16 years old." "I'm a devout Pastafarian." "I'm a human."
Perhaps in context, it would be acceptable, e.g.
I'm in my second year at Moscow University. What are you?
but even there, a qualifier helps, such as
I'm in my second year at Moscow University. What year are you?
You're in the army? What rank are you?
On the other hand,
What do you do?
is not offensive, but again needs context.
My computer won't boot. What do you do?
is quite different from,
You work here? What do you do?