This question is similar to ”what do you do for a living, or how do you earn your living”? In Spanish you might say: ¿cómo se gana la vida o el sustento?
For Mr. Sanchez, the Spanish Prime Minister, politics is his livelihood (el vive de la política).
Yes, you can also ask, what is your job, or what do you do (que haces)? It is better to vary your vocabulary, so that your speaking or conversation is more interesting.