Madam Margaret, also known as Madam Margie, is the evil leader/principal of St. Rita's Preparatory School and Margie's future self in an alternate future. She is the leader of the Girl Squad and the ruler of the dystopian world of girls.
In Operation: F.U.T.U.R.E., Numbuh 4 was sent to Madam Margaret's boarding school, unaware of her evil intentions, and almost got turned into a girl. Luckily, he escaped but had to hide to avoid her mobile school. As a consequence of his defeat, 75 years in the future, girls dominated the world and brutally oppressed all the boys they could find.
Luckily, Numbuh 4 had established his own resistance group known as the Boys Next Door, who rescued boys from the girls. Eventually, they made one last stand against the girls with the help of a Girl Squad defector named Sally Sanban. Before almost all the remaining boys were defeated and transformed into girls, Numbuh 4 and Sally managed to infiltrate the Girl Squad's mobile fortress and confront Madam Margaret again.
The latter boasts that Numbuh 4 is the only boy left now, but Numbuh 4 claims he is not going for any boys in the future, but in the past. He then used Margaret's time machine to go back in time to warn the KND about Madam Margaret. Madam Margaret attempted to follow Numbuh 4, but Sally crushed the time machine so Madam Margaret couldn't follow him back in time. Realizing that her fate was sealed and that she now didn't have any escapatory, Madam Margaret shouted a very long "No" in a moment of despair. After Numbuh 4 was rescued and young Margie was taken in custody by the Kids Next Door in the past, the dystopian future inhabited by girls 75 years later was erased, as was the futuristic Madam Margaret.
It's completely unknown how Margie's defeat in the past will alter Madam Margaret's future (considering that they are the same person). However, it seems that she would not be able to create the Girl Squad as she would be captive at the Kids Next Door Arctic Base.