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