A flat character is like a pencil sketch of a person. You have some idea of what they look like, what their goals are, even their basic personality, but none of the detail that would make them feel real. A round character is the opposite. They do have those details, and they come across as real people even though the audience knows they are fictional.
There are a lot of round characters in Harry Potter, but there are also many who have only a small part to play and therefore minimal characterization. Pansy Parkinson is Draco Malfoy’s mean-spirited and frivolous girlfriend. Hepzibah Smith was a wealthy and easily-manipulated woman from whom Voldemort stole Slytherin’s locket and Hufflepuff’s cup. Sturgis Podmore is a member of the Order of the Phoenix who Voldemort tries to use to get the prophecy. That’s … pretty much all there is to those characters.
On the other hand, if I said, “Harry Potter is an orphan raised by his aunt and uncle who discovers he has magical powers and is the chosen one of a prophecy”, I have only scratched the surface of who Harry is. I’ve said nothing about his personality, his morals, his friendships, his goals, his hopes, his fears, his doubts, his strengths and weaknesses, or any of the myriad of other things that define who Harry is. And, unlike the characters I mentioned in the previous paragraph, Harry has all those things and more. Flat characters can be summed up in a few words or a sentence, while round characters would require an essay to do them justice.
Another way to classify characters is by their character development. A dynamic character changes over the course of the story, while a static character remains the same. These two concepts are often lumped together, with the assumption that round characters are dynamic and flat characters are static. Most examples fit this pattern. For example, I named Pansy Parkinson as a flat character. Aside from aging seven years over the course of the series, she does not change very much. She does not reconsider her actions, but nor does she go any further down the path that she’s on, (for instance by fighting for Voldemort in the Battle of Hogwarts). In Deathly Hallows, she’s still the same shallow, unpleasant schoolgirl she’s always been. On the flip side, Draco Malfoy looks very much like a flat/static character early in the series. Around the time of Half-Blood Prince, it becomes evident that he is neither. His development in the final two books both deepens his characterization beyond the one-dimensional playground bully and forces him into a situation where he can’t continue to be just the playground bully.
However, a static character (who does not change) can also be a round character whose personality is well developed but remains constant. For example, Hagrid is a major character with a fully-developed and lifelike personality, but he does not change over the course of the story. The Hagrid who delivers Harry to his aunt and uncle’s house in Sorcerer’s Stone is essentially the same Hagrid who carries him back to Hogwarts castle in Deathly Hallows. If he changes, it’s in very small ways. The same is true of many of the other adults in the series as well.
It’s harder to imagine a dynamic character (who changes) somehow not being a round character. In order to understand why someone would undergo a major change, their character would have to be complex. It’s not impossible, though: one example from Harry Potter that comes to mind is Regulus Black. We know he started out as a loyal Death Eater and later chose to betray Voldemort. We know what he discovered that made him reconsider. But his actual personality is extremely vague and is revealed entirely through other characters’ descriptions. Ariana Dumbledore is another such character, one who goes through a dramatic change but is never fully fleshed out as anything more than a plot device. Both are purely backstory characters and are dead before the main narrative begins, and both are defined almost entirely by the change they went through, with very little personality beyond that change.
However, it is true that the vast majority of round characters are also dynamic, and the vast majority of flat characters are also static. Complex characterization usually leads to character development and change over time, while shallower characters who exist only as a pencil sketch idea typically stay the same.