When an employee wants to resign, you can try to persuade them to change their mind but you can't refuse to accept their resignation.
If they later withdraw their resignation, generally you don't have to agree to them continuing to work for you. You should act carefully though if the employee has handed in their notice in controversial circumstances, eg after an argument.
This guide sets out what you should do when a staff member resigns. It also gives advice on how to carry out an exit interview and deal with resignations in difficult situations.