What Ted Williams is talking about here is a baseball statistic called batting average. For a long time, batting average was seen as the best way to decide if someone was a good hitter.
A player's batting average is determined by taking the number of hits they get (in a season or a career) and dividing it by the number of at bats they get. If a person gets 3 hits in 10 at bats, their batting average is .300. This is considered to be a very good average. Ted Williams was the last player to hit better than .400 for a whole season and that was in 1941.
What Williams was saying in this quote is that baseball is an inherently difficult or even frustrating sport. A batter who fails 7 times out of 10 is a good batter. Imagine if you failed 7 of 10 classes in school. Or imagine if a doctor failed to cure 7 of 10 patients who came to them.
So this is a statement about how difficult and frustrating baseball is, at least from the perspective of a hitter.