There usually are people to whom a suicidal person can turn for help; if you ever know someone is feeling suicidal, or feel suicidal yourself, seek out people who could help, and keep seeking until you find someone who will listen. Once again, the only way to know if someone is feeling suicidal is if you ask them and they tell you.
Suicidal people, like all of us, need love, understanding and care. People usually don't ask "are you feeling so bad that you're thinking about suicide?" directly. Locking themselves away increases the isolation they feel and the likelihood that they may attempt suicide.
Asking if they are feeling suicidal has the effect of giving them permission to feel the way they do, which reduces their isolation; if they are feeling suicidal, they may see that someone else is beginning to understand how they feel.
If someone you know tells you that they feel suicidal, above all, listen to them. Then listen some more. Tell them "I don't want you to die".
Try to make yourself available to hear about how they feel, and try to form a "no-suicide contract": ask them to promise you that they won't suicide, and that if they feel that they want to hurt themselves again, they won't do anything until they can contact either you, or someone else that can support them.
Take them seriously, and refer them to someone equipped to help them most effectively, such as a Doctor, Community Health Centre, Counsellor, Psychologist, Social Worker, Youth Worker, Minister, etc etc. If they appear acutely suicidal and won't talk, you may need to get them to a hospital emergency department.
Don't try to "rescue" them or to take their responsibilities on board yourself, or be a hero and try to handle the situation on your own.
You can be the most help by referring them to someone equipped to offer them the help they need, while you continue to support them and remember that what happens is ultimately their responsibility.
Get yourself some support too, as you try to get support for them; don't try to save the world on your own shoulders.