Early racing - Rallying
Early 911 concentrated on rallying - 4 wins in Monte Carlo (1968, '69, '70 and '79) and European Rally Championship ('70). However, being beaten by the small Alpine A110 in 1971, Porsche understood that 911 was too big to be an inherent rally star, thus virtually quit this field and concentrated in circuit racing.
Nevetheless, Porsche still built several 911s to race some less-competitive events, such as Safari and Paris-Dakar rally.
Golden Period - GT Racing
Concentrated in GT racing, 911 found itself virtually unbeatable in the following 10 years. In 1973, 911 Carrera RS 2.7 and Carrera RSR 2.8 (derived from RS 2.7 road car) dominated the Group 3 and Group 4 GT scenes respectively, beating Ferrari Daytona, DeTomaso Pantera and the 7.4-litre Chevy Corvette easily.
Next year, the RSR 3.0 won the European GT Championship in the same overwhelming style. In 1976 to 77, the Group 4 was dominated by 934 turbo, whose name indicating it was a variant of 930 designed for Group 4.
As you might guess, the Group 5 racer was called 935. This was the most successful production-based racing car ever appeared in the world - in 8 seasons, it won no less than 42 World Championship events and a staggering 70 IMSA championship races in the USA. Its outstanding record reached a glorious climax in 1979, when Klaus Ludwig and Don and Bill Whittington drove their Kremer Porsche Racing 935 swept all aside at the Le Mans 24 Hours. That was the first time the famous event had been won by a production-based car rather than a Group 6 car.
Entered the 80s, Porsche seemed losing interest in motorsport. It slowed down the development of 956 / 962 Group C cars and virtually stopped developing any 911 GT racing versions until 1990, when it established its own Porsche Super Cup for some low-level modified 911s to race in. At the same time, the revival of Le Mans GT Class racing led to the emergence of 911 LM turbo, 911 RSR 3.8, 911 GT2 etc, though all of these low-level modified cars were raced by private entry.
Porsche resumed its interest in GT Racing in the 1996 when it launched 911 GT1 to compete with McLaren F1. However, this car had no relationship with the road car 911 except its name, so it is out of our scope.