To just quote the Rambam on this halacha does not serve any justice.
This is a very, very complicated question that can have many nuances, and it is discussed at length in dozens of tshuvos in the acharonim. In smaller than a nutshell, it depends how the husband knows this and if he believes it, if the husband was informed by his wife, the adulterer or someone else. Sometimes the husband is permitted to continue living with his wife, but in essence she is not allowed to live with him although a Beis Din (jewish court) may allow her.
Without going into any depth, a man is only forbidden to his wife if there are 2 witnesses or if he believes a single witness or his wife like 2 witnesses. He is not obligated to believe his wife if she says she committed adultery since it is possible she is lying and wants to re-marry, she only said this in order for him to be forced to divorce her. Additionally there is a תקנת רבינו גרשם which stipulates for Beis Din to force a man to stay married even if he believes her, for the reason just mentioned - otherwise any woman who wants a divorce will just tell her husband she committed adultery and then he would be forced to divorce her. This תקנה was initially implemented when the wife later reverts from her claim, however some poskim hold a man may rely on this תקנה and therefore the wife should not say anything to her husband, since he is not obligated to believe her and even if he would, he might not necessarily become forbidden to her.
Just to cite a few-
נודע ביהודה קמא עא, ותנינא יב , כא
חכם צבי ס' קנ
מנחת שלמה ח"ג ס' ק"ב
קובץ תשובות חלק ה ' ס' רטו'
There is also a major argument in the acharonim if the Beis Din encourages the woman or adulterer to inform the husband or not. Some hold the adulterer may reframe himself from informing the husband because of כבוד הבריות.
הנודע ביהודה (מהדו"ק או"ח סי' לה)
דברי חיים חלק או"ח סי' ל"ה
שו"ת שבט הלוי (ח"ח סי' רפז)
ספר חפץ חיים - הלכות אסורי לשון הרע - כלל ד
שו"ת יביע אומר חלק ב - אבן העזר סימן ב