For example, say someone gets the Unsung Hero badge for 10 or more zero score accepted answers, and 25% of total. Now, say someone goes and votes for some of their zero score accepted answers. Do they still have the badge? I'm not speaking specifically about this badge, but it's one easy example I thought of.
Once you get a badge, it is yours forever.
For most cases, once you get a badge, it is yours forever. The big exception is tag badges. If you no longer have the required score or number of answers in a tag, then a tag badge will be withdrawn.
But for almost every other badge, they are yours to keep once they're awarded to you.
If the badge system changes again, I would expect a cannonical place to read about the new behaviors to be the How do badges work? on Meta.SE.
As pointed out in Asaf's comment, one exception is that tag badges can be removed.
I will copy here the content of Arthur Fischer's comment from another question, where he provided more details: