It is normal for young people to share – good things and things that are bothering them. Most often friends can give each other good advice and nothing more need done.
If however a friend is telling you about any kind of abuse or that they are harming themselves can be more difficult. They may ask that you keep what they’ve said a secret – that’s not unusual. While it might have helped them to share the worry with you, that will not make the abuse stop.
They need to tell an adult who they can trust to help. You can help them think who that might be, and offer to be with them when they first tell. If your friend doesn’t feel they can do this, you still need to do something.
You will likely feel very torn between keeping your friends secret and trying to make sure they are safe. That can be a huge worry for you, and you need help in dealing with that. You should talk to someone you trust to work out what needs to be done. That might be your own parent, another family member, a teacher or someone else.
You can also contact ChildLine for some advice. Your friend may be upset and angry that you have shared what had been going on for them, but making sure they are safe is actually more important.