English has three main tenses – the past, the present and the future. As you might expect, the past tense is used to describe events that happened before the present. As you probably also expect by now from English, things are a not that straightforward. For a start like the other English tenses, the past tense (which you will find described as the 'preterite' in some older textbooks), has aspects, a voice and a mood. This might seem complicated, but the result is that by matching and combining mood, voice and aspect, we are able to describe the past very precisely.  So let us go through these ways of describing the past one by one.
Past Simple The past simple would be more simple if it did not have a negative and a positive form. Consider - I painted the ceiling yesterday. I did not paint the ceiling yesterday.
As you can see, in the positive the main verb takes a unique form and does not use an auxilliary. With 'regular' verbs this form is made by adding '-ed' to the end of the verb. (e.g. 'Paint-ed'). Just to complicate things, this simple past form is often the same as the past participle of the verb, even though the past participle has a different function. Finally, past simple positive verbs can be irregular – and the more commonly a verb is used, the more likely it is to be irregular. Sometimes the irregular form is the same as the past participle, and sometimes it is not. For example: take (infinitive), took (unique simple past form), taken (past participle). The good news is that irregular verbs are regular in the negative. For example: He took my pen. (irregular) He did not take my pen. (regular)
Past Progressive This is also sometimes called the 'Past Continuous'. It tells you what was happening at the same time as another action in the past. For example: I was sleeping when you called. In this sentence 'called' is simple past, and the main verb is past progressive formed from the auxiliary 'to be' in the past form ('was/were') and the present participle of the verb. (Sometimes called the -ing form; here 'sleeping'.) Unlike the past simple, the negative form of the progressive is identical apart from the addition of the negative indicator. I was not sleeping when you called. Usually the progressive is used with a time indicator, often another verb, which tells us when the progressive action was happening. In the example above the time indicator is 'when you called'.
However it can also be a time or a situation. For example: I was sleeping at two o'clock. It was hot while I was sleeping. Note also, that usually we put the most important part of the sentence first. So if the important thing in the first example was that someone called, that would come first. When you called, I was sleeping. But if the important thing is your interrupted sleep, that comes first. I was sleeping when you called.
The Perfect The two other aspects of the past are the Past Perfect and the Perfect Progressive, which are described in our section on the Perfect. https://www.english-online.org.uk/adv6/advmobile/adv6gram1.htm, if you need to review these.) Remember though, that while the Present Perfect seems to be a past tense, it is actually as the name says – a present. Consider - He has already watered the plants. Even though the plants were watered in the past, this is a present tense because the present condition of the plants is that they are now watered. This only becomes a past tense when the plants dry out and we can say. He watered the plants. (But now he has to do it again!)
Past Passive So far we have described the past with only one of the two 'voices' - the active. Unlike the active voice, the passive voice does not describe an agent. (Or if it does, it does this by inserting an 'agent clause'.) Consider the active form- John took my pen. 'John' is the agent, 'took' is the past simple description of what John did, and 'my pen' is the object which John took. The past passive of this sentence looks like this - My pen was taken [by John]. Notice that we do not need the agent clause for the sentence to be complete and grammatical. We can just say 'My pen was taken.' This is also useful if you do not know who took your pen, because you do not need to describe an agent you do not know. The grammar of the past passive is again the auxiliary 'was/were', but this time the main verb is in the past participle form which we met earlier. Again the positive and negative forms are the same apart from the negative indicator. My pen was not taken.
Other Aspects of the Passive The passive can be used with all aspects of the past, with auxiliaries used to tell us things like voice and which aspect is being used. This can lead to some complicated and clumsy sentences if done with poor style. Consider - The car had been being driven without oil for an hour before they noticed. When we look at this sentence we can tell from the auxiliaries that the main verb is a past perfect progressive passive. Firstly, the main part of the verb is a past participle, which tells us that the verb is passive with the auxiliary 'be'. We know that the perfect is being used because of the auxiliary 'have' and we know that the verb is progressive because there is an auxiliary 'be' in the continuous form of 'being'. We know that the verb is past perfect, because the past perfect is formed from 'have' and the past participle, and because the main verb is being used to indicate a passive, the past participle is used on the next auxiliary, giving us 'had been'.
Fortunately for English students, such complex constructions are rarely used.
Yes, sentences have moods – actually they have quite a few moods. For example, a sentence can be inquiring (interrogative mood) as in What did you think you were doing? Here the auxiliary 'do' is inverted with the subject 'you' to show that we have a question, and 'do' is in the past to show that the question is past simple. (The second clause is a basic past progressive.)
In modern English we usually use the past subjunctive mood for imaginary situations, or situations that did not happen. Consider - If you had told me, I would have helped. (But you did not tell me so I did not help.) These constructions are called 'conditionals' and you can find out more about them here: https://www.english-online.org.uk/adv7/advmobile/adv7gram1.htm
We also use mood to look at things that did not happen in the past. He should have remembered my birthday. I could have been a brain surgeon. He might have died when he was young. Some moods are not used in the past – for example the imperative mood (giving orders) is only useful for the present or the future. You cannot tell someone to do something yesterday.
The Intermediate section on the Past Tense Here has more information which you might find useful.
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Making a point