The basic difference between ‘were’ and ‘was’ is obvious: ‘were’ is used when the number of objects or entities exceeds one, as in‘We were late for the dinner’. ‘Was’ is used when only one object or entity is being referred to, as in‘I was late for the dinner.’
There are, however, nuances in their use. For example,‘Everyone was well-dressed’seems incorrect because ‘everyone’ refers to more than one person. However, here the implication of the pronoun comes into play; ‘everyone’ refers to all the members of a group individually, as do ‘none’ (None of us was well-dressed) and ‘each’ (Each of us was well-dressed). Hence, ‘was’ is used after these words instead of ‘were’. On the other hand, ‘all’ refers collectively to the entire group (All of us were well-dressed).
This does not mean, however, that ‘all’ and ‘were’ necessarily always go together. When ‘all’ is used with countable nouns, it is correct to use ‘were’, as in‘All the apples were stale.’However, when it is used with non-countable nouns, which are in the singular form, ‘was’ must be used, as in‘All the milk was over.’
What about 'The examination was failed by all the students'?This, too, can be confusing. After all, here ‘all’ refers to the collective student body but ‘was’ is used. This is because the verb ‘was’ acts on the singular ‘examination’, not on the phrase ‘all the students’. If the subject (‘examination’) were to be pluralised (‘examinations’), ‘was’ would have to replaced by ‘were’.
Lastly, the use of ‘were’ as the past subjunctive of the present ‘to be’ is important. A subjunctive is used to express possibility, hope, supposition, etc., rather than to state a fact. Hence, we say,‘If I/he were famous...’instead of‘If I/he was famous...’