They mean that the puppy had been wrongly called “ugly.” The context here is that they demonstrated that none of the puppies were ugly at all. Quotes like this mean that the writer is repeating a statement they themselves disagree with. When used to invert a compliment, I’ve heard quotation marks like this called scare quotes.
This might be read out loud as, “The quote-unquote ugly puppy.” In conversation, they could also be indicated by an “air-quotes” gesture, that is, extending and curling the index and middle fingers of both hands twice with the palm facing outward and the other fingers clenched. (You’ve probably seen this, and it should be easy to find examples.) Or the speaker could just say “ugly” in a sarcastic tone of voice.
All of those mean that the speaker is being sarcastic, and would not be used otherwise. “The complaint describes the environment as, quote, ‘toxic,’ unquote,” (or “end quote”) is the most common way to verbally quote another person’s exact words neutrally, when you cannot use punctuation marks, but must be explicit about where the exact quotation begins and ends. If it’s obvious from context or doesn’t matter, you wouldn’t pronounce the quotation marks at all, other than maybe a pause.
Another way to say the same thing would be, “the so-called ugly puppy.”