Most generally, when people tell you they are going to commit suicide, this is their way of asking for help. That means, it is your job to get them help. You need to find a trusted adult, and tell them. Immediately.
You know, one of my friends almost committed suicide once. I didn't really say anything to her; I just showed her all of the wonderful things that she would be missing if she killed herself. I reminded her how much her family and friends (including me) loved her and told her how it would affect me if she decided to give up. Just give them a reason to keep fighting. But don't be scared; they'll take that as a sign that they are hurting other people and REALLY need to die. Just make sure to be there for them. It may feel like doing nothing but, believe me, it makes a difference. Good luck. :)
Tell them they are loved and can count on u to be there for them. Tell that their depression will pass. Then make sure everyone else knows the person is suicidal. The more people that know the less likely they will actually do it.
Tell them you are there for them and are looking out for their best interest. But, they need help from professionals - not well wishers. Put them in touch with someone who can get the ball rolling on help and do so SOON.
most likely they dont want some adult to come in and take control of their life. like Cjkenkel said, they just want help/ attention. You need to find out what is making them want to commit suicide. After that, you can then combat the source. My friend wanted to do it because he felt bullied. In that situation, you would tell the person that they are way above the person bullying them. You need to point out the good things in life. make them feel good about themself.