罰する(ばっする) means to punish or penalize someone for a crime, rule violation, or serious wrongdoing.
It sounds formal and severe. You will see it in legal, religious, news, or organizational contexts, not casual daily talk.
The passive form 罰せられる(ばっせられる), to be punished, is especially common in laws, regulations, and news reporting.
For everyday situations, choose a lighter word:
叱る(しかる): to scold
お仕置き(おしおき): discipline / punishment, often used for children or playful contexts
Avoid 罰する(ばっする) for things like parenting or minor misbehavior unless you want to sound unusually strict or dramatic.