Cubic, tetragonal, and monoclinic phases of zirconium oxide with oxygen vacancies and polyvacancies are studied by quantum chemical modeling of the atomic and electronic structure. It is demonstrated that an oxygen vacancy in ZrO2 may act as both an electron trap and a hole one. An electron added to the ZrO2 structure with an oxygen vacancy is distributed between two neighboring Zr atoms and is a bonding orbital by nature. It is advantageous for each subsequent O vacancy to form close to the already existing ones; notably, one Zr atom has no more than two removed O atoms related to it. Defect levels from oxygen polyvacancies are distributed in the bandgap with preferential localization in the vicinity of the oxygen monovacancy level.