Similar to how geophysicists learn more about Earth’s interior by studying waves created by earthquakes, astronomers study the waves of the Sun and other stars. The speed of sound through a medium carries information about that medium and also about the object in which the sound bounces around.
Sound waves are pressure waves, and their speed is influenced by the temperature and density of the gas through which they propagate. You may have experienced this yourself: when taking a breath of helium from a balloon, your voice produces a funny high-pitched version of itself as the sound waves travel through a lighter gas in your lungs.
The brightness variations of stars inform scientists about their internal workings. And by linking this information to computer models mimicking stars, scientists can deduce general properties like their mass, radius and age.