There are two ways in which you use were.
1. Used as a PLURAL of Was. In English, the plural verbs are used when the subject is singular (Or the second person) and the singular verbs are used when the subject is plural.
I / He / She / It was
You / They were
This is the simple part. The difficult part is when it is used as a subjunctive !
2. Used as a SUBJUNCTIVE. : "denoting a mood of verbs used when the content of the clause is being doubted, supposed, feared true, etc, rather than being asserted"
You tend to see it with constructions such as
* If he were my brother, nobody would mess with me
* If only I were president
It's also used for (among other things) situations that are contrary to actual fact.
* I wish I were going to the ball.
* He wished it were Saturday.
Read more about subjunctive in english here :
All the best :)