As is the case with some of the other conjugation forms, the preterite forms are made by removing the infinitive ending of the verb (-ar, -er or -ir) and replacing it with an ending that indicates who is performing the action of the verb.
To take one example, the infinitive form of the verb that means "to speak" is hablar. Its infinitive ending is -ar, leaving the stem of habl-. To say "I spoke," add -é to the stem, forming hablé. To say "you spoke" (singular informal), add -aste to the stem, forming hablaste. Other forms exist for other persons.
The endings are slightly different for verbs that end in -er and -ir, but the principle is the same. Remove the infinitive ending, then add the appropriate ending to the remaining stem.
The following list shows the conjugations for each of the three infinitive types using hablar (to speak) as representative of regular -ar verbs, aprender (to learn) for -er verbs and escribir (to write) for -ir verbs. The added endings for each verb are indicated in boldface.
Hablar: yo hablé (I spoke), tú hablaste (you spoke), el/ella/usted habló (he spoke, she spoke, you spoke), nosotros/nosotras hablamos (we spoke), vosotros/vosotras hablasteis (you spoke), ellos/ellas/ustedes hablaron (they spoke, you spoke)
Aprender: yo aprendí (I learned), tú aprendiste (you learned), el/ella/usted aprendió (he learned, she learned, you learned), nosotros/nosotras aprendimos (we learned), vosotros/vosotras aprendisteis (you learned), ellos/ellas/ustedes aprendieron (they learned, you learned)
Escribir: yo escribí (I wrote), tú escribiste (you wrote), el/ella/usted escribió (he wrote, she wrote, you wrote), nosotros/nosotras escribimos (we wrote), vosotros/vosotras escribisteis (you wrote), ellos/ellas/ustedes escribieron (they wrote, you wrote)
As you may notice, the -er and -ir verbs follow the same pattern in the preterite. You might also have noticed that in the first-person plural (the "we" form), the same conjugation is used for both the present indicative and the preterite for -ar and -ir verbs. Thus hablamos can mean either "we speak" or "we spoke," and escribimos can mean either "we write" or "we wrote." Almost always the context makes clear what is meant.
Remember that in Spanish, unlike English, the personal pronouns listed with each verb form can often be omitted. The distinctions among the different Spanish forms of "you" are explained in this lesson.
Note also that the conjugations above are for verbs that follow the regular conjugation. Although most verbs conjugate regularly, the most common verbs usually do not (just as in English, where verbs such as "to be" and "to go" are highly irregular).