Maybe they get caught while using magic in a way that's not allowed in the public eye. They then have to face the consequences from the Shadowhunter authorities, which could lead to a whole adventure of trying to prove their intentions were good. They also might have to face the reactions of their friends and family who might be worried or disappointed.
Find a private space where you are sure no one will interrupt. Lock the door if possible. Also, be aware of your surroundings and make sure no one is likely to come in unexpectedly.
If you get caught masturbating to fanfiction, it can lead to extreme embarrassment. People around you may form a negative opinion of you. Socially, it could damage your relationships as it's considered a very private and inappropriate act to be caught doing.
When Emma and Regina get caught, it depends on what they were caught doing. If it was something related to magic use that was prohibited, they could face punishment like being stripped of their powers temporarily or having restrictions placed on them. Also, their personal relationships with other characters could become strained as a result of the catch.
They could get detention. If it's a school - based fanfiction, getting caught doing something naughty or against the rules might land them in detention. They'd have to sit there, probably bored out of their minds, and think about what they did wrong.
It could be a mischievous Pokemon. Maybe a Ditto that has gone a bit wild and accidentally turned into a Pokeball and then somehow 'captured' Ash when he touched it.
One of the best getting caught stories I've heard was when my friend tried to secretly eat a whole cake. His mom came home early from work and caught him with a face full of frosting. It was hilarious because he looked so guilty.
Well, once my friend thought he was being super sneaky smoking weed in his room. But he didn't realize that the smoke alarm was also a carbon monoxide detector. It went off and his whole family came running. His mom was so mad when she smelled the weed. He just stood there with this goofy look on his face, not knowing what to say.