Glass is transparent to sunlight allowing it to pass into the interior of the car. It heats up the intetior. But heat waves do not escape from the car due to glass being opaque to the same. As a result, the interior of the car placed in the sun will become very hot. It is similar to glass house effect.