Teen injured after car hits tree in NSW

A teenager has been injured in a single-car crash in regional NSW but two other teens in the car were unharmed.

Firefighters pulled the 17-year-old boy from the front passenger seat of the Subaru after it hit a tree in Orange in the state's central west about 12.30am on Friday.

He was airlifted to a Sydney hospital in critical condition.

The male driver, also 17, and a 14-year-old girl travelling in a back seat were unharmed.

NSW Police said the driver was taken to a hospital, has undergone mandatory drug and alcohol testing and is now assisting investigators with their inquiries.

Witnesses are being asked urged to come forward as is anyone with dashcam footage of the crash.

Meanwhile, firefighters have spent nearly four hours putting out a semi-trailer that caught on fire and exploded on the NSW north coast on Thursday night.

The B-double caught fire on the Pacific Highway, blocking two lanes outside Pimlico.

It was hauling six tonnes of aerosol spray cans, as well as gravel and cane mulch.

The cans ignited and caused a large explosion but the truck driver and another motorist made it to safety as the fire took hold.

Multiple fire and rescue units were involved in putting out the blaze, which included numerous spot fires around the scene caused by scattered cans.

An absorbent barrier was set up to protect the environment from liquid run-off and 400 litres of spilt diesel fuel from the burning rig, which was destroyed in the fire.

The cause of the explosion has not yet been determined.