There are several ways to ask what someone does for a living:
The simplest would be: Was ist dein Beruf/Job? Beruf means profession, but job is more oriented at the actual work. You learn a profession, but this does not mean you also work in that...
You can also ask:
Was machst du beruflich? (formal: Was machen Sie beruflich?).
Was arbeitest du?
Als was arbeitest du? Here you ask for the activity, the status in a company etc.