In Avengers: Age of Ultron, the Black Widow, a.k.a. Natasha, a.k.a agent Romanoff, is seen discussing her past with Bruce Banner, a.k.a. Hulk. Prior to this, Bruce Banner is wary of the consequences of their relationship and tells her that he can not be a father and she would not be able to conceive and give birth to their next generation, if they indulged in this relationship.
To this, Black Widow replies that, she knows and understands this and reveals that, she too is technically not able to conceive, owing to a part of their training in the "Red Room" facility. The flashbacks of her past are shown in this scene.
But I am not sure, what exactly they do to incapacitate women agents from getting pregnant. Either it was not obvious to me from the scene or it was left for the viewers to imagine.
I have googled a lot but could not come to any conclusion. If someone can shed some light on the technicalities, preferably with some references that would be great!