Each horse has a set of 6 stat gene pairs. One pair corresponds to each of the horse's stats and bears the same name. For example, the Breaking stat gene correlates to the Breaking stat. Simple, right? These genes can be viewed if you have the Stablewide Hidden Genes purchased, which can be found in the Pro Shop.
Stat genes are very important! When it comes to breeding, they will determine the "base" point for each of the foal's maximum stats. (Thus also their maximum potential.) Like all genes, it's important to match them carefully to get the best outcome in foals. The higher the gene, the better the starting base will be. However, not all horses will have stats that actually match up with what you'd expect from their genes. Though these genes provide a base, the final outcome for each stat will go up or down based on other factors such as producer quality and bloodline.
In addition to determining the stats a foal inherits, stat genes can be useful for a couple more purposes. First, you can look at stat genes on a young horse and estimate what you would expect their maximum stats and potential to be. Second, you can compare a horse's actual stats (once maxed) to their stat genes to get an idea of their parent's producing quality. If a horse has much lower stats than you'd expect based on genes, one or both of their parents are likely bad producers. If a horse has much higher stats than you'd expect based on genes, one or both of their parents are likely good producers.
In normal situations, where producer quality and/or bloodline have a neutral or slightly positive impact, you should expect stats to max roughly as follows:
A horse with entirely Excellent/Outstanding should max at 40+ potential under "normal" (neutral) circumstances. A horse with mostly Good genes will usually max somewhere around 30 potential. A horse with mostly poor/fair will typically max under 20 potential.
NOTE: Stat genes have absolutely no impact on the stats a horse earns when they are transitioned to Steeplechase. Their stats are zero'd out and rerolled solely based on a gene known as Jump. High (or low) stats on a SC horse are also NOT indicative of producer quality.