Since we are interested in biblical answers, let us first note that God doesn't divide sins into public and private sins that need to be treated differently. There are sins that are done publically and there are sins that are done privately, but the answer to sin remains the same.
If someone is not a Christian, then he must become a Christian to have his sins washed away. See How to Become a Christian.
If a Christian sins, then he must change both his attitude and behavior to be as God desires (II Corinthians 7:10-11). He also has to confess his sin to God (I John 1:9). He ought to also find fellow Christians to talk to so that he can find support in overcoming sin (James 5:16).
When a Christian knows another has sinned, he is required to talk to the sinner in hopes of turning the person away from sin and back to God. "Brethren, even if anyone is caught in any trespass, you who are spiritual, restore such a one in a spirit of gentleness; each one looking to yourself, so that you too will not be tempted" (Galatians 6:1).
Here is where it gets awkward. We try hard to keep the embarrassment of having sinned to a minimum when a sinner repents. "My brethren, if any among you strays from the truth and one turns him back, let him know that he who turns a sinner from the error of his way will save his soul from death and will cover a multitude of sins" (James 5:19-20). That is what is meant by "cover a multitude of sins." We don't hide the fact that a sinner is sinning, but when someone has left sin, we drop the matter. However, when sin is widely known to have happened, how do the brethren know if it has been repented of or not?
When a person repents of his sins, he should let those he has wronged know that he has changed so that any hardships caused by his sin can be resolved. This can be handled by going to each person individually, but some prefer to let everyone know at once so the topic can be put aside. That is where we get the practice of offering people a chance to let the congregation know of repented sins at the end of services. It is not required. It is a matter of convenience.
To be clear, the sin in your example is not the pregnancy. The sin was the fornication that has been taking place. The child that resulted was the consequence of sexual sin but is not the actual sin. The fact that an unmarried woman is clearly pregnant merely indicates that sin has taken place. But even here, without asking, you don't know if the pregnancy was the result of a rape or consensual sex. The person needs to be talked to because we want her to reach heaven.