Your question comes from 1 John 5:16.
If anyone sees his brother commit a sin that does not lead to death, he should pray and God will give him life. I refer to those whose sin does not lead to death. There is a sin that leads to death. I am not saying that he should pray about that. All wrong doing is sin, and there is a sin that does not lead to death.
The simple answer to your question is that it is the sin that is forgiven. When sin is forgiven, it no longer leads to death. One of the themes of 1 John is assurance of continued acceptance by God, even when we fall into occasional sin.
But if we walk in the light, as He is in the light, we have fellowship with one another and the blood of Jesus, His Son, purifies us from all sin. – 1 John 1:7
To walk in the light is not to avoid all sin, for John immediately says, “If we claim to be without sin, we deceive ourselves.” He later said:
I write this to you so that you will not sin. But if anybody does sin, we have one who speaks to the Father in our defense – Jesus Christ, the Righteous One. – 1 John 2:1
Jesus is the light of the world. When we walk in His light, we have sweet fellowship with God – and our sins are forgiven continuously. On the other hand, if we go back into darkness, sin is then unto death.
Jesus spoke of an unforgivable sin – the blasphemy against the Holy Spirit. He said this because the scribes from Jerusalem who had come to “check Him out” said, “He is possessed by Beelzebub! By the prince of demons he is driving out demons” (Mark 3:22, 30).
Hebrews 6:4-6 speaks of some whom it is impossible to bring back to repentance. I remember a visit I had with a former Bible teacher who had turned away from serving God. After talking with him about how God had loved him so much He gave His Son for us, and pleading with him to return to the Lord, I asked him, “Can’t you feel His Spirit striving with you right now?” This erstwhile brother paused (for what seemed an eternity) before he answered, “No.”
Here was a man who had grieved the Spirit (see Ephesians 4:30) to the point that he had quenched the Spirit that God had given to him when he came to the Lord as His son (see Galatians 4:6 & 1 Thessalonians 5:19).
When does that time occur? I do not know. I am also sure that some whom we cannot bring to repentance, God can. In fact, when it comes down to it, it is only God who brings any of us to repentance by His goodness (see Romans 2:4). When, however, we continually and habitually disregard His goodness or even attribute His goodness to the power of the prince of demons, a time comes when even God gives up on us.
A time came in the life of the Kingdom of Judah, just before God sent them away into Babylonian Captivity for a 70-year exile, that He told Jeremiah not to pray for this people any more.
Do not pray for this people nor offer any plea or petition for them; do not plead with me, for I will not listen to you. Do you not see what they are doing in the towns of Judah and in the streets of Jerusalem? The children gather wood, the fathers light the fire, and the women knead the dough and make cakes of bread for the Queen of Heaven. They pour out drink offerings to other gods to provoke me to anger. But am I the one they are provoking? declares the LORD. Are they not rather harming themselves, to their own shame. – Jeremiah 7:16-19
When we become hardened as Judah was, God no longer listens to prayers on our behalf. It took the Captivity to get them to forsake the worship of other gods. Jeremiah’s tears and pleading with them and to God for them were useless. They had sinned a sin that is unto death.
Until then, keep praying for all who sin that they may be led by God’s Spirit into a nobler life that is more and more like that of Jesus.