During this section of the Book of Mormon the great prophet and patriarch of his family, Lehi, dies. This causes much sadness on the part of all of his children, and increased contention between Laman and Lemuel and the rest of their family. The contention gets so bad that Nephi fears for his life, and he takes the righteous among him and flees from his brothers. This causes a literal separation of the righteous and the wicked, where there was already a fairly bold line in spirit. This seperation creates what we know to be the Nephites (those who followed Nephi and chose to keep the commandments of God), and the Lamanites (those who sought to take away Nephi's life, or at least to follow those who did).
In the world, it is often hard to distinguish between those who are righteous and will lift us up, and those who are not so righteous and might bring us down. Usually there isn't an actual physical distance when it comes to choosing friends, but there are several things we can learn from Nephi's experience that can help us make correct choices when it comes to those we associate with.
First, we can remove influences we already know to be bad. If there is anything in our lives that brings us down, be it friends, television shows, music, etc., we can simply take it away. This will increase the influence of the Spirit, which will allow us to better discern between right and wrong when choices come into our lives.
Second, choosing friends with similar values to you. This does not mean that you completely ignore or disassociate yourself from anyone different than you, it simply means that you choose to spend the majority of your time with those who share your values, and help you uphold them, rather than disregard them.
And last, the power of missionary work can do wonders in these decisions. If you aren't sure whether someone will turn out to be a positive influence, ask them to meet with missionaries, and help them on that path. If they choose to meet with the missionaries, whether or not they accept the Gospel, you can know they care about your standards and will help you uphold them in times of trial.