She was challenged for the leadership. Heseltine ran against her. She won more votes than him, and in fact she won more than 50% of the votes, but the Conservative Party rules at that time required there to be a second round if the incumbent did not win by a certain margin. She failed to reach that margin by 3 votes. If she had not been in Europe fighting Britain's case in the week before the election she might have got those 3 votes.
The point is - yes, she was ousted by her party, but she did also choose to step down.
None of this is really the main point though. The important thing is what she stood for. It amounts to being self reliant and taking responsibility for your own actions and life.