The answer to this question is two-fold.
We should never abandon our unsaved family and friends because we could be their only link to the gospel and become born-again. As we grow in our faith, they will see the Holy Spirit's transformation of us from the inside out. Jesus will use that conformity and our godly lives as a witness of His goodness, power, and saving grace to our friends and family. Therefore, we never want to cast them from our lives.
However, new believers need to be especially careful about how much time they spend with unbelievers. Without a strong foundation in Christ yet or longevity in their relationship with Him, they are more easily susceptible to the world's influences and getting sucked back into ungodliness.
Case in point: When my husband was a new believer in his late teens, he desperately wanted his friends to be saved. He thought his faith was strong enough to withstand his previous drug and alcohol lifestyle, so he spent much of his time with his partying friends in their environment. Although he intended to share the gospel with them, the temptation to indulge his flesh became too much to withstand. Within a short while, he was back to his old life and feeling more wretched than before.
Six years later, my husband surrendered his life back to Jesus. With his renewed commitment came the resolve to distance himself from his partying friends and their bad influence. He told them why he needed to pull back and said he would pray for them, which he did faithfully. His choice to draw a distinct boundary around himself proved invaluable and strengthened his faith throughout the years.
Over the past several decades, my husband has periodically touched base with his friends and ministered to them. Thankfully, one of his close friends became born-again. But the same cannot be said of the other three. One of his buddies has died; one remains addicted to drugs and is dying of cancer, and another suffered a tragic car accident and is intellectually disabled.
Paul said in 1 Corinthians 15:33, "Do not be deceived: 'Evil company corrupts good habits.'" Therefore, it is essential for new believers to first establish themselves in God's Word and the local church. This endeavor will help them build and strengthen their faith while equipping them to withstand the temptations and influences of their unsaved friends and family.
New believers should also pray for their lost loved ones and share the gospel whenever possible. However, separating themselves from constant contact with them will serve them well in the long run.