The windshields on NASCAR race cars are made of Lexan, which is the same polycarbonate material used on fighter-plane canopies. This material is very strong, but also surprisingly soft. This softness is actually what gives it its strength. When an object hits the Lexan windshield, it doesn't shatter it. Instead, the object scratches, dents or imbeds itself in the windshield.
The windshields are usually constructed from three relatively flat pieces of Lexan. Each piece is supported by a framework built into the roll cage -- this gives the windshield the strength to resist large objects. The downside of a Lexan windshield is that it scratches very easily -- you could scratch one with your fingernail. A bare Lexan windshield would have to be replaced after every race because of scratches from sand and other grit on the track. But instead of replacing them, the NASCAR teams apply an adhesive film to the windshields that is harder than the Lexan and as clear as glass. After each race, the film can be peeled off and replaced, leaving the Lexan unscratched. Some teams apply several layers of this film and remove them one at a time during the race.
In the 1950s, NASCAR race cars used the fuel tanks from whatever street car they were based on. There were some schemes for wood reinforcements, but leaks and fires were common. Today's 22-gallon fuel tanks, also called fuel cells, have built-in safety features to limit the chance of them rupturing or exploding.
Fuel cells have a steel outer layer and a hard, plastic inner layer. The fuel cell is located in the rear of the car and is held in place by four braces that keep it from flying loose during an accident. It is filled with foam, which reduces the slosh of the fuel and any chance of explosion by reducing the amount of air in the cell. If the cell does ignite internally, the foam absorbs the explosion. The car also has check valves that will shut off fuel if the engine is separated from the car.