The 25 races in which Ferrari did not compete at all were:
Ten of the 11 Indy 500 races that counted towards the F1 championship between 1950-1960. It was common for European F1 teams not to enter the Indy 500 during its time on the F1 calendar, due to the significant distance involved. Ferrari did enter Alberto Ascari in 1952, but he span off after 40 laps.
The 1950 British GP, the first-ever F1 championship race. Ferrari elected not to take part for reasons unknown.
The 1959 British GP: a strike in Italy prevented Ferrari from attending.
The 1960 and 1961 US GPs. In both years, this was the final race of the season. The team did not enter in 1960 as they could not win the title, and Enzo Ferrari wanted more time to prepare for 1961, when the engine formula would change to 1.5 litres. They did not enter in 1961 as they had already won both titles at the previous race in Monza, but that race had also seen the horrific death of Ferrari driver Wolfgang von Trips along with 15 spectators.
The 1962 French GP: a metalworkers' strike in Italy prevented Ferrari from attending.
The 1962 US and South African GPs. Ferrari had a poor season in 1962, finishing just 6th in the championship (out of
with no race wins, despite having dominated the previous season. They decided not to bother showing up for the final two races.
The 1966 British GP: another metalworkers' strike in Italy prevented Ferrari from attending.
The 1966 Mexican GP: I haven't yet found a source explaining why they didn't attend this one, but it was the final race of the season and both championships had already been won by Jack Brabham and his eponymous team. My assumption is that they were either focusing on next season, like they'd done in 1960, or sulking like they'd done in '62.
The 1967 South African GP: I haven't found a source for this one either, but the race took place unusually early in the year: January 2nd. The next race, at Monaco, was four months later. It's possible Ferrari were still busy upgrading the 312.
The 1968 Monaco GP. When the '67 Monaco GP eventually did arrive (see above), Ferrari driver Lorenzo Bandini was killed in a fiery crash. Safety improvements were made to the track for '68, but Ferrari felt they were inadequate and refused to attend.
The 1969 German GP: Enzo Ferrari spent 1969 investing in rebuilding and restructuring the team, who had been struggling for the previous few years and were still using the 312 from 1966. As a result, Ferrari's F1 efforts were limited that year; they only entered one car into most races and, at the German GP, they entered none.
The 1973 Dutch and German GPs: Ferrari were using the ageing 312B that season, which was slow and unreliable; there were multiple other races that year in which they only entered one car. Several other teams also refused to enter the German GP after the horrific death of Roger Williamson at the preceding Dutch GP.
The 1976 Austrian GP. The FIA had initially disqualified James Hunt's McLaren from that year's Spanish GP, but later overturned the decision and allowed Hunt to keep his race win. Hunt's title rival that year was Ferrari's Niki Lauda, who had just suffered his infamous fiery crash at the preceding German GP. Ferrari thus refused to enter the Austrian GP - Lauda's home race - to protest Hunt's reinstatement.
The three races that they entered, but did not start, were:
The 1950 French GP: Ferrari withdrew their two drivers prior to qualifying, for reasons unknown. (Peter Whitehead, a privateer, competed and finished third in a Ferrari 125, but this does not count as a Scuderia Ferrari entry.)
The 1982 Belgian GP: Ferrari driver Gilles Villeneuve was killed during qualifying, and Ferrari immediately withdrew from the race.
The 1982 Swiss GP: With Ferrari's other driver, Didier Pironi, having suffered a career-ending crash two races earlier, Villeneuve's replacement Patrick Tambay was their only entrant, and he was unable to start after suffering a pinched nerve in his back.