And Ham, the father of Canaan, saw the nakedness of his father and told his two brothers outside.—Genesis 9:22
Nakedness is still considered (mostly) immodest today and people with good sense don't let anybody but their spouse or their doctor see what they normally cover up, but in the biblical times, nakedness was considered extremely shameful. To see someone in their nakedness was an extreme violation, an act of disrespect, of dishonor.
Whether Ham sees his father on purpose or not, we can't rightly say, but in any event he appears to find Noah's shame amusing and he goes and tells his brothers, probably joking about it. He has an opportunity to cover his dad's shame and instead he exposes him further.
What's interesting about this event in the context of this passage is that Ham's sin is treated as more serious than Noah's. Noah has drunken himself into passing out—we're not talking "getting buzzed" here, we're talking about getting blacked-out drunk—but the emphasis of wrongdoing in the passage is on Ham for laughing about it.
This doesn't mean that drunken exposure is not a sin. But it does seem to mean that denying a sinner grace is a bigger one. Couldn't we say that Jesus certainly had harsher words for the outwardly tidy religious leaders of his day than the drunks? He told them all to "sin no more," but he seemed to regard intentionally squandered opportunities to cover shame as somehow more heinous than (so-called) "sins of the flesh."
We commit the sin of Ham whenever we hear of someone's struggle, of sin, of failure, and instead of figuring out how to bring grace to them, we "run and tell." We gossip. We pile on.
We should note that in all the Bible's words about reproof and rebuke and discipline, the Bible never says to "confess one another's sins."
And Ham has capitalized on his father's great vulnerability by heaping more shame on his shame.
But his brothers had more grace.
Genesis 9:23 reads, "Then Shem and Japheth took a garment, laid it on both their shoulders, and walked backward and covered the nakedness of their father. Their faces were turned backward, and they did not see their father's nakedness."
Some translations read "the garment," indicating that this garment is the one Noah had with him in the tent, suggesting that Ham even further exposed Noah by taking it fully off and out of the tent with him. Almost as if Ham wanted his father's shame exposed in order to enjoy it. (I wonder if there's a lesson there for our tabloid culture and the spiritualized schadenfreude evident on Christian social media about those falling away.)
In any event, Shem and Japheth with the utmost care and reverence, go to cover their father. They do not treat his sin casually. But they do treat it with mercy.
It is possible Peter has this image in mind in 1 Peter 4:8 when he writes, "Above all, keep loving one another earnestly, since love covers a multitude of sins."
This is what Christians do when confronted with the sins of others; they do what they would want done for them—not shaming, not ridiculing, not lording over—a demonstration of grace.
This doesn't mean not mentioning someone's sin or never confronting or rebuking or preaching against sin—it just means doing so with reverence for God and with grace, not to demean or squash or humiliate, but to provide the shelter of God's love.