The windshield in your car is made of laminated safety glass, designed to withstand significant force, which increases safety in case of an accident. This type of glass has two separate pieces of glass with vinyl in between, laminated together using heat and pressure to solidify the glass.
Because there are multiple layers in your windshield, when a small object such as a rock strikes it, usually it just damages the outer layer of glass, so the windshield can be safely repaired without requiring full replacement. In more severe accidents, the glass will often shatter but not come apart completely, because the glass on either side of the vinyl will adhere to the vinyl. An intact windshield acts as a barrier to keep objects inside the vehicle (including people).
Other windows in the car are made of tempered glass, which is heated and cooled rapidly so it is stronger than average glass. It is designed to shatter into small pieces instead of large, jagged pieces, so if there is an accident it is less likely to injure vehicle occupants.