Where we use was n were?

You can use was in the sentence "There was a car in the driveway" and were in the sentence "There were cars in the driveway". Both of them mean something similar but were refers to the plural.