The first interrupter-gear equipped airplanes used standard rifle-caliber machine guns such as the Lewis gun and Maxim gun. These designs were more or less identical to the ones in use in the trenches. They had one major disadvantage: lack of firepower. Even WWI biplanes could survive many hits from rifle-caliber bullets unless the gunner was very lucky and hit a critical engine part or the pilot.
During the interwar period, aircraft designers began upgunning their planes. This was made even more important by the evolution of all-metal fuselages. By the outbreak of WWII, most fighters were equipped with heavier weapons such as 20mm cannon and .50 caliber machine guns. During the Second World War itself, this arms race escalated even further. Some late-war fighters mounted semi-automatic 30mm cannons capable of destroying even the heaviest bomber aircraft with a few hits.
During the 1960s, there was a move towards fighters armed only with missiles. It was widely believed that the increased speed of aircraft in the Jet Age, combined with their greater turning radius, made the concept of dogfighting with machine guns and cannon obsolete. The first production versions of the F-4 Phantom, for instance, were built without a nose-mounted cannon. During field use in the Vietnam War, pilots grew frustrated by their inability to make close-range kills against North Vietnamese aircraft. Furthermore, a missile-only aircraft was in great danger if it was attacked after firing all of its limited supply of missiles.
Armorers began jury-rigging cannon onto the F-4s in Vietnam, and later production runs of the aircraft returned to the combination gun-missile armament mix. Today, most fighters continue to mount some kind of cannon.
The following was added on at the suggestion of Transitional Man
, who has my thanks for his suggestion.
Prior to World War II, most aircraft guns were intended mainly to shoot down other aircraft. This was relatively easy, because even the most heavily armored aircraft would submit to a few direct hits from exploding 20mm shells. During the Second World War, this pattern began to change.
Aircraft designers rapidly realized that tanks were especially vulnerable to air attack because of their thin top armor. In response to this, some ground attack aircraft were optimized for the anti-armor role. Such planes would be armed with a high-velocity antitank gun, often slung under the fuselage or built to fire through the propeller nosecone. Another examples of this included the B-25 Mitchell, in which some versions were refitted with a short-barreled, extremely lightweight 75mm cannon for antishipping duties.
The antiarmor role in modern aircraft is mostly taken by helicopter gunships. These gunships mount batteries of rockets and rapidfire autocannon that can launch a devastating top attack against armored units. One of the most effective antiarmor fixed wing aircraft is the A-10 Thunderbolt II, a very heavily armored plane used by the US Air Force. Known coloquially as the Warthog, the A-10 is essentially constructed around a massive 30mm GAU-8 Gatling gun.