go to work

When is it that ‘work’ means ‘a workplace’
and when is it that ‘work’ means ‘to do a job’
in the usage of ‘go to work’?

It depends entirely upon the context as it can mean either, Without additional information it’s not possible to tell for certain, however, most of the time the phrase will mean ‘go to your workplace in order to do your job’.