While flak rarely shot down many enemy planes, it had a dramatic effect on the effectiveness of air attacks.
Anti-aircraft guns can be divided into two major categories: rapid-fire, low-caliber guns such as quad guns, and slower-firing, high-caliber guns such as the '88'. The former type is still in use today, while the latter type has been largely replaced by SAMs.
'Light flak', usually in .50, 20mm, or 30mm caliber, could not reach very high into the sky. However, it was very effective at destroying low, slow-flying planes within its reach. This typically forced WWII bomber pilots to fly higher, so as to remain out of range of the light flak. Since the bombsights of that era were crude at best, this enormously degraded bombing accuracy. It also disrupted attempts to use low-level bombing attacks against troops in the field.
'Heavy flak', such as the famed 88mm gun, on the other hand, could lob shells to altitudes as high as a bomber could fly. The difficulties of getting a targeting solution against a bomber several kilometers in the air were formidable, though, and few aircraft were downed by flak hits. The flak still interfered with bombing operations despite this. Bombers under flak attack tended to take evasive action, increasing the chance of navigational errors during flight and of misses during the bomb run itself. Also, many aircraft were damaged by flak. This could make them easier prey for fighters, possibly damage them enough that they would be forced to crash land before returning to base, and force the bombers' ground crew to repair them before sending them on another sortie.
On the other hand, the outlay required to maintain this anti-aircraft force severely harmed the German war effort. Roughly one third of all artillery production was dedicated to manufacturing antiaircraft guns and ammunition, most of which were used for home defense. An even larger proportion of Germany's optics and electronics industries were dedicated to the flak batteries. If most of those resources had instead been devoted to the fighting front, it is possible that the Germans would have won the war before Allied strategic bombing attacks became powerful enough to be ptentially decisive.