All punishments should be talked about before hand. I believe before any type of punishment there should be a cooling off period.
When the Dominant is going to punish it must be made clear why he is going to punish, and what the consequences are for the rule that was broken.
If I want to get my point across or punish I have had Arianna speak in thirds, this really made her think.
Some forms of punishment can range from spanking, to humiliation, cage confinement. You can take something away for a period of time, or the almighty silent treatment which I do not use myself.
The punishment must be talked about, why you are punishing and what you expect in the future, more important what the submissive is going to do to correct the problem. Maybe the Dominant can help in the future as well.
Here is a quote from the Denversubmissive the post comes from http://www.denversub.com/bdsm.html
Few Dominants are willing to invest the emotional psychological commitment needed for punishment to help the submissive work through the cause of the disobedience and the intense aftermath. Real punishment belongs within the context of a strong relationship whether that be a close friend or lover/spouse. Punishment does not occur with a stranger. For many submissives/slaves, a D/s relationship without real accountability and punishment is not a real D/s relationship.
I love that quote I love it even more coming from another submissive. So this is just not my opinion but the opinion of a submissive as well.
I hope You learn something.