This is a common question that unbelievers have. The Bible says that God is loving (Psalm 103:8, 1 John 4:10) and that He is not willing that any should perish (2 Peter 3:9). If a person has never heard of Jesus, the Bible says that God is going to be absolutely fair with them (Psalm 98:9), and that He will judge them based on what they do know through the testimony of creation and their conscience (Romans 1:20, 2:12-15).
If a person responds favorable to the testimony of his conscience or the the testimony of creation and truly seeks to know God, the Bible says that “God is a rewarder of those who diligently seek Him (Hebrews 11:6).” God has many ways of getting the truth about salvation through Christ to those who seek Him. He can send them a missionary (Acts 10), allow them to hear a radio broadcast, give them a dream or vision (Daniel 2, 7), send them an angel (Revelation 14:6) or a Bible (Psalm 119:130), direct them to a website, etc. so that they can know the truth.