The imperfect subjunctive is formed by starting with the preterite form of the verb. This means that verbs that are irregular in the preterite will have the same irregular stem in the imperfect subjunctive.
Other than that, though, irregular verbs follow the same formation rules as other verbs: take off the ending -ram from the preterite form and add the imperfect subjunctive endings: -sse, -sses, -ssemos, -ssem. For example:
dar(to give) → eles deram(they gave) → de-
eu desse, você/ele/ela desse, nós déssemos...
querer(to want) → eles quiseram(they wanted) → quise-
tu quisesses, vocês/eles/elas quisessem...