"My son, do not walk in the way with them. Keep your feet from their path."
This is the crucial item of protection for the young person. Do not think that you can hang with people who live a wicked lifestyle and not get sucked in yourself. If you hang around with those who do drugs, steal, beat people up, are sexually active, you will eventually embrace this activity.
Notice that Solomon is talking to us as our spiritual father and telling us what we need to hear even though we may not want to hear it.
There are people who are very accepting and even kind towards new people in order to have a new person involved with their activities. I have noticed that in the teen years there is always a group of druggies and bad kids who are always willing to accept the outcast teen. Eventually those people become your friends and you start doing stuff with them.
The only way to save yourself from all the pain that their lifestyle will cause you is to not be with them. Period. There is no super-strengthening process that will allow you to be with them and not eventually fall to their way of life. You have to get away from them. Choose different friends.
The proverbs will go on to detail the consequences of a sinful and selfish life, but let me just outline a few things. It will begin to have a negative impact on your relationships with your other friends. You will begin to get in trouble with authority: parents, school officials, teachers, police, others. Your potential for the future is diminished because you no longer put in the time to study and pursue those opportunities. You will limit what you can do to earn a living and limit the amount you can make. There will be some people who will heed the advice of this verse and begin to stay away from you. All this begins to happen just because you do not remove yourself from the group of people who are doing evil things.
You can and should pray for them, but you should not walk in the way with them.