The first thing to do is to approach this situation coolly and remain calm. Under no circumstances should you go along with those trying to blackmail you.
Cyber Grooming
There is a concept of "Cyber Grooming" - minors are lured to take naked pictures or videos and then are blackmailed with them.
It Can Happen to Anyone
Don't blame yourself, and don't think you're the only one who could be in this situation. Many people worldwide go through the same thing, both their peers and adults. The main thing is to ask for help in time and not to be provoked, not to fulfill the blackmailers' conditions.
Random Messages With Threats and Extortion
It even happens that scammers randomly send threatening letters to everyone in the hope that this trick will work with someone. They can extort money, threaten to send out your photos, or send a virus attack to your computer, for example. If you haven't sent anything (photos of yourself or anything like that which you are being blackmailed by), you can complain to the social networking service or make a warning post for other people.
What to do if Blackmailed With Photos or Videos?
If you can't handle the situation alone, get help! Don't be alone with your difficult feelings. It is urgent to report it to adults you trust (it's great if you have a psychologist among them).