Ask questions.
Ask more questions.
You'll be surprised . . .
. . . that you'll eventually get to the bottom of it.
Some more concrete steps.
1) Ask them about their reasons and let them do the talking. Make the environment informal - like an open forum discussion. Remember - you want him/her to be comfortable to enable him/her to pour out his/her feelings.
2) When he/she is done, discuss every issue that she raised. Drill down. (For example, if he/she says that she is not happy anymore. That is vague. Ask him/her more specific questions . . like are you unhappy with your responsibilities? with your pay? with any team member?)
3) Come up with possible solutions to the points that the employee raised.
4) Let the employee think about his/her decision. Give her time to think it over.
An important thing to remember is that not all problems can be solved and you can't always convince an employee to stay or not to resign. The main goal of this discussion to know the real reasons behind an employee's desire to leave. By finding out, both the team leader and the employee, can figure out on how to move forward, on how to improve current practices and how to learn from this experience.