Yesterday's daf (Shabbos 14a) has a whole slew of gezeras relating to טומאה and טהרה. Among them is a gezera that anyone who pours 3 קבין of water on themselves becomes a שני לטומאה and is מטמא תרומה. It is generally assumed that nowadays a shower does this. The reason given for the gezera is that the chachamim were afraid that people would think that the washing after going to the mikva is really what makes you טהור and not the mikva. Although this gezera has no relevance nowadays, when the Beis Hamikdash is rebuilt and we have תרומה this will be very relevant, anyone taking a shower will become טמא and need to go to the mikva.
It is also interesting that Ezra was מתקן טבילת עזרה for טומאת קרי so that people would show
restraint. בדיעבד if you pour 3 קבין of water on yourself (e.g a shower) it is good for טבילת קרי and takes away that טומאה which is quite חמור, you aren't
allowed to learn, and replaces it with a less severe טומאה.
course these are all dinim d'rabbanan. When the Beis Hamkidash is
rebuilt and we have a Sanhedrin and מלאה הארץ דעה, the Sanhedrin may
decide to be מבטל some or all of these gezeros given the changes in lifestyle.
The Mordechai applies this gezera in the gemara (if you take a shower after going to the
mikva you are טמא) to hilchos nidda. The simple understanding of the
gemara is that the chachamim made up a new טומאה and therefore it has no
relevance to hilchos nidda. The Mordechai however learns that the pshat
is that taking a shower cancels the tevila, and therefore a woman who
goes to the mikva and then takes a shower is prohibited to her husband.
We are machmir for this Mordechai לכתחילה. The poskim have different
shiurim for how long she can't take a shower. One shiur given is until
she is נוהג היתר with her husband, after that it is clear that the mikva
was matir and not the shower.