It's true, but it's also not easy for beginners or those who exercise very lightly to build muscle.
First the muscle must be taxed and stretched. This will lead to tiny tears. Many people don't exercise hard enough to create the tears or put the muscle under enough strain.
The muscle will then repair itself, but it is not yet growing. The muscle must reach its limits first - this is known as 'newbie gains', when you begin strength training and feel like you're getting stronger each week. And you are, as you use more and more of the muscle's capabilities. But then, the muscle will reach its limit and you'll stall.
People tend to quit now.
However, if you're ready to keep going, begin to eat a surplus of food each day (keep this in check.) Your body will recognise your muscles need to grow in order to cope with the stress you're putting them under, and some of the surplus calories will go to muscle growth. Some to fat. This is why after a bulk (consumption of excess calories and heavy strength training to encourage muscle growth) athletes will then do a cut (careful weight loss to shed the fat, whilst minimising muscle loss at the same time.) Cycle and repeat.
You won't automatically build fresh muscle tissue in the first few weeks at the gym - otherwise all overeaters would just get muscley. You also won't build muscle doing very gentle things like a dainty 10 minute jog - the muscles have to be put under strain, such as with weights or with bodyweight training/calisthenics. That's why runners may look lean but not heavily muscled.
Deliberate gaining of muscle is actually pretty difficult, requiring not just time in the gym but careful managing of diet, intake and ensuring nutritional balance. It's not something that can be done with little effort, accidentally, or at your fourth session of Zumba.
You will feel some muscle swelling after each workout, this is usually water and blood flow. But it's pretty cool all the same.