What you've heard is correct.
If you are a beginner this thread will answer your questions:
https://www.rollitup.org/newbie-central/1326-101-already-asked-questions.html
However, I'll indulge anyway. A male plant when flowering produces sacks of pollen which eventually burst and pollinate the flowers on a female plant this will then produce seeds. This is what breeders do and this is how we get our seeds. However, as 'bud' growers, this isn't what we want to see in out garden.
When the female plant isn't exposed to pollen she continues to produce flower which are bigger (I guess to attract the pollen) and eventually when no pollination occurs the plant starts to die( this state of the female is referred to as sinsemilla,
Spanish sin semilla, seedless or without seeds) . The buds ripen off and some pistils turn brown. We cut it, dry it, smoke it.
So in short, when you find a male get rid of it before it ruins your dank bud!
Peace