What is this black exhaust type thing coming off the side of this land cruiser? What is it for?

It is a fresh air snorkel. The purpose is to raise the air intake so water won't be sucked into the engine while crossing streams or deep puddles.
For a real off roader, the exhaust will also be vented high so there is no water ingress into the engine.