A car has crashed into a tree and the driver is trapped in the vehicle.