Conservative leadership: What are the rules for any challenge to Theresa May?

Theresa May is under pressure over Brexit and some of her MPs have called for a change of leader. But how could this happen?
Each party has its own rules for selecting a leader. Under the Conservatives' system, there are two ways to trigger a leadership contest.
One, unsurprisingly, is if the leader resigns. The other is if 15% of Conservative MPs write letters saying they no longer have confidence in her.
These letters have to be sent to the chairman of the 1922 Committee, which is made up of all backbench Conservative MPs.

The 1922 Committee chairman - who is currently an MP called Graham Brady - does not reveal how many letters he has received until it reaches the 15% mark, which means 48 letters would have to be received.
This would trigger a vote of confidence in Mrs May among all Tory MPs. It would be a secret ballot, and if she won, she would be immune from challenge for a year.
But if she lost, there would be a leadership contest, and she would not be able to stand.
How a contest would work
The 1922 Committee sets the timetable for the contest.
Tory MPs then choose two candidates to present to a vote of the wider membership of the party.
If necessary, they whittle the field down to two with a series of ballots where the lowest-ranking person is eliminated after each round.
Then it is time for the party members to vote for the winner. The two candidates would be expected to take part in debates to put their cases forward to members before the final voting deadline.
If there is only one candidate, that person becomes leader with no need for a vote from members.
Unless there is a general election, the winner of any Tory leadership contest would also be expected to become prime minister.