It is the simple past tense and also continuous past tense suffix for the subject "we". We use the same suffix to say 'we used to do something'- something that we used to do in the past repeatedly. Another use is 'we had done something', past perfect tense in English. Also to say 'we were going to do something' again we use this suffix.
It can be dık, dik, duk, dük. We decide which one to choose (ı,i,u,ü) looking at the the last vowel of the verb. If the last vowel a,ı --> dık, e,i --> dik, o,u --> duk, ö,ü --> dük.
Before we add this suffix, if the last consonant is one of these letters f,s,t,k,ç,ş,h,p then the letter d turns into t and the suffix becomes; tık, tik, tuk, tük instead.
Some examples with their translations;
(biz: we, ev: home, -e: to, gelmek: to come, doktor: doctor)
Biz doktorduk. We were doctors.
Biz eve geldik. We came home.
Biz eve geliyorduk. We were coming home.
Biz eve gelirdik. We used to come home.
Biz eve gelmiştik. We had come home.
Biz eve gelecektik. We were going to come home.
-->We can use it when we use 'could' or 'would' in the past tense, too.
Biz eve gelebilirdik. We could/would come home.