>For instance, what labor laws apply?

The laws of the worker's locality is generally how it works. In the film industry, a production company based in LA might do a shoot in NYC- they have to follow NYC's labor laws since that's where the workers are and the work is being done.

The workers at the home base in LA have the LA laws applied to them.

>And who enforces them?

The local government.

Exactly, and those answers are why it’s a hurdle and a leap of faith.

The company has to adhere to labor laws in foreign countries (most likely plural if this is a general policy). That’s quite the overhead and opens you up to legal trouble.

The employee has to trust their government can prosecute or otherwise coerce a foreign company with no entity on their territory (otherwise they’d just get hired normally through the subsidiary).

LA and NJ remain two states of a common country and I'm sure that simplifies a lot of things.

Although none of this applies if the company is a multinational with offices in the employee’s country. But then that is offshoring rather than remote work.