Boar taint is an unpleasant odor and flavor that is present in some pork products. It is caused by hormones produced by male pigs on reaching puberty, so the most common solution, both traditionally and currently, is to castrate the boars well before puberty.
The taint arises from two chemicals; the pheromone androstenone, and a metabolic byproduct known as skatole, which is usually broken down in the liver; testicular steroids prevent the breakdown of this substance in boars. Skatole is most often described as a 'fecal' scent, while androstenone is often described as either smelling of sweat, urine, vanilla, or nothing at all, depending on your genetic predisposition (this is also the chemical that accounts for the variation in human responses to sweaty men). About 75% of people can smell boar taint and find it unpleasant, but people may be responding differently to different components of the scent, with some finding it absolutely repulsive and some finding it mildly off-putting.
Both of these chemicals accumulate in the boar's fat, but the presence of taint is less impacted by how fat the boar is and more by diet and genetics. Careful breeding has reduced the presence of taint in many breeds, while other methods of preventing taint include a "vaccination" which triggers the boar's immune system to clear out the offending chemicals, or simply selling smelly meat at lower prices, as it is commonly used in sausages and hot dogs with little ill effect.