Type 1 RTA occurs because the alpha-intercalated cell has defunct H+/K+ exchange pumps- therefore, since you cannot pump H+ into the lumen, you become acidotic, and because you can't take K+ out in this region either, you become Hypokalemic.
Type 2 RTA occurs because for a variety of reasons (defunct Na+/Bicarb cotransporter, Carbonic Anhydrase deficiency, etc.), you cannot reabsorb bicarbonate in the proximal tubule. This increases Na+ delivery to the collecting duct, where Na+ is reabsorbed at the expense of K+ excretion. This occurs to maintain charge neutrality.
Uptodate has an excellent article on this: "Pathophysiology of renal tubular acidosis and the effect on potassium balance"