Magical people are living among us -- in hiding(Part I). More or less (Part II). They have reasons to do so (Part III), and if the reasons requires it, characters who enforce it.(Part IV) (Digression here)
So -- what exactly is it that they do?
Well, the first thing they may do is hide. Those under the masquerade spells tend to live in out-of-the-way locations, under spells of illusion or invisibility or distraction, with spells to turn aside attention or feet. The lack of drama in that tends to move it to backdrop while the stories focus on what is done to contain escaped knowledge.
There, cover stories and ridicule are the lightest version. Tell everyone that it's for a movie. Claim the area is shut down for a gas leak. Ask if you got that idea from a tabloid. Call the elf an imaginary friend -- and if children grow out of seeing the fae, the child himself may grow to believe that. Give all the witnesses good reason to regard it as confidential.
This works for very tight masquerades, where few people see so much as one anomaly in their lives, or for a loose one where there's a lot of misinformation running wild.
Past that, the traditional one is memory spells. Remove the memory of the magic from the mind.
This is visible in the mildest form in The Wind In The Willows where the encounter with Pan as they search for an otter child ends:
For this is the last best gift that the kindly demi-god is careful to bestow on those to whom he has revealed himself in their helping: the gift of forgetfulness. Lest the awful remembrance should remain and grow, and overshadow mirth and pleasure, and the great haunting memory should spoil all the after-lives of little animals helped out of difficulties, in order that they should be happy and light-hearted as before.
Similarly -- though without the explanation that it is kinder that way, in Puck of Pook's Hill, Kipling has Puck erase the children's memory in such a way that the children aren't even aware that they didn't spend the day frolicking without any fae appearing.
Memory destruction can grow more dangerous. In Piranesi, it is clear that the narrator will never really remember his old self, and while he has created a new self instead, there was another character in his position before who was effectively ruined. In Harry Potter, we are told of a character hit by so many Obliviate spells that it was affecting his mind, and others where the Obliviate damaged memory in general. In Witch Hat Atelier (where the masquerade is a bit odd, hiding that anyone can be a witch rather than their existence), memory removal spells wreak terrible harm.
Though both Harry Potter and Witch Hat Atelier grasp perfectly that it would be an never-ending battle. People being people, even fearful danger will not keep them from making contact forever. Arthur Weasley and a number of other Ministry officials are endlessly covering up the practical jokers, the criminals, and the careless. (Using spells with abandon that would certainly be crimes in Muggle law if they were known.) Likewise the dedicated Knights in Atelier pursue those who violate secrecy like those who violate the laws of magic.
Intimidation is another technique. We are told in Monster Hunter International that people who survive encounters with the magical monsters of that universe -- which are so dangerous that monsters that can not be killed for a bounty are those marked out as the special group (PUFF-exempt) and they have to earn that membership -- are often more traumatized by the government agents who swing into action to tell them to keep their mouths shut, if not to call them delusional.
On the other hand, in Monster Hunter International, such victims are often recruited to maintain the masquerade because they have proven they can survive an encounter without going mad. Even those who were intimidated into silence -- a young woman who had been brutally assured that her father had killed the rest of her family and himself, and her memories to the contrary were delusions, timidly approached a man showing signs of knowing the truth. He "read her in" and directed her to another man who was in the masquerade, telling her she probably wasn't suited to monster hunting, but that they needed support staff.
Less brutal worlds still often draw in the people who breach the masquerade. They showed useful skills in the subsequent events, they already know, that they were able to do it is evidence that they were special in some way -- and, of course, the ever-ready plot device, that the main character is allowed in.
On the other hand, if the character is considered for inclusion, and fails, murder is often on the table for the more brutal masquerades. Some worlds do not flinch from it. When these characters are villainous, it can be toned down, but still it darkens the world.
Careful consideration is needed. The means these characters choose will set the tone for much of the world.
"Mind Control" is a Turn-Off for me and "Memory Wiping" is almost as bad IMO.
Especially, if the person doing it thinks that "no harm" has been done to the victim. 👿