Luke 13:1-9
1 There were present at that season some that told him of the Galilaeans, whose blood Pilate had mingled with their sacrifices.
2 And Jesus answering said unto them, Suppose ye that these Galilaeans were sinners above all the Galilaeans, because they suffered such things?
3 I tell you, Nay: but, except ye repent, ye shall all likewise perish.
4 Or those eighteen, upon whom the tower in Siloam fell, and slew them, think ye that they were sinners above all men that dwelt in Jerusalem?
5 I tell you, Nay: but, except ye repent, ye shall all likewise perish.
6 He spake also this parable; A certain man had a fig tree planted in his vineyard; and he came and sought fruit thereon, and found none.
7 Then said he unto the dresser of his vineyard, Behold, these three years I come seeking fruit on this fig tree, and find none: cut it down; why cumbereth it the ground?
8 And he answering said unto him, Lord, let it alone this year also, till I shall dig about it, and dung it:
9 And if it bear fruit, well: and if not, then after that thou shalt cut it down.
Verses 1-5 of this passage are often used to teach that unless you "repent" of your sins, you will "perish", which is interpreted to mean "go to Hell when you die".
Then, verses 6-9 are used to teach that unless you "bear fruit" by living a certain way, you will be "cut down", and ultimately go to Hell.
Let's analyze this passage to see if those are valid interpretations of what the Lord is teaching.
Firstly, notice how similar the passage is to what John the Baptist said in Luke chapter 3, and the parallel in Matthew 3:2-10:
Luke 3:3-9
3 And he came into all the country about Jordan, preaching the baptism of repentance for the remission of sins;
4 As it is written in the book of the words of Esaias the prophet, saying, The voice of one crying in the wilderness, Prepare ye the way of the Lord, make his paths straight.
5 Every valley shall be filled, and every mountain and hill shall be brought low; and the crooked shall be made straight, and the rough ways shall be made smooth;
6 And all flesh shall see the salvation of God.
7 Then said he to the multitude that came forth to be baptized of him, O generation of vipers, who hath warned you to flee from the wrath to come?
8 Bring forth therefore fruits worthy of repentance, and begin not to say within yourselves, We have Abraham to our father: for I say unto you, That God is able of these stones to raise up children unto Abraham.
9 And now also the axe is laid unto the root of the trees: every tree therefore which bringeth not forth good fruit is hewn down, and cast into the fire.
This passage above, covered in the two articles here and here, is primarily targeted at unbelieving Jews, and is in reference to the imminent kingdom ruled by the Messiah that both John and Jesus preached.
With that in mind, we arrive what was likely three years later in Christ's ministry - as the parable mentions "these three years I come seeking fruit on this fig tree, and find none" (Luke 13:7), and the Jews have largely rejected their Messiah, with the Lord running into confrontation with the leaders of the Jews on a constant basis, and having them stir up opposition to Him amongst the people, everywhere He preached.
Therefore, the "fig tree" in the passage in question is primarily representing the nation of Israel, with its failure to "bear fruit" standing for their failure to accept Him. This will later pop up again, when the Lord curses a fig tree that He finds fruitless (Matthew 21:18-20, Mark 11:12-14, 11:19-21), and it withers and dies, symbolizing God replacing the Jews as His chosen people with a spiritual nation consisting of Jewish and Gentile believers, as the Lord goes on to say:
Matthew 21:43
43 Therefore say I unto you, The kingdom of God shall be taken from you, and given to a nation bringing forth the fruits thereof.
Therefore, it's valid to conclude that "except you repent" in the passage refers to a turning from unbelief to belief in Jesus as the Messiah, and the "perishing" refers to both a physical death - which was the only kind of death referred to in the passage (Galileans killed by Pilate, and some others dying in a tower collapse) - as well as a spiritual "perishing" which comes dying in unbelief, as we read:
John 3:15-16
15 That whosoever believeth in him should not perish, but have eternal life.
16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
In the passage in Luke chapter 13, Jesus said "except ye repent, ye shall all likewise perish" (Luke 13:3, 13:5), and in John He says that if you don't believe, you will perish. "Repent" is substituted for "believe", because they are turning from unbelief to belief. That's what is being demanded.
This passage does not teach that unless someone repents "of their sins" to some unknown degree, they will go to Hell. That false doctrine is covered in much more detail in the article You Do Not Have to Repent of Your Sins to be Saved. That is a 100% works-based Salvation, given that one understands the Lord's definition of "sin".
Instead, this passage is aimed primarily at unbelieving Jews who were rejecting the Messiah that tried to come to them, which He laments over later at the end of the chapter (Luke 13:34-35), as well as the judgment that this rejection demanded,.