The Jhanas dont last forever, they just last a long time each time you go into one and each time you enter them the defilements of the mind are surpressed but not removed which is why jhanas dont give liberation.
The reason you abandon the first and move onto the second is because you realise that the first one is based on conditions and impermanent.
"he enters and dwells in the first jhana, which is accompanied by applied thought and sustained thought with rapture and happiness born of seclusion"
then realisng hte impermanence of the happiness you abandon it for the second jhana and so on up until the fourth when the mind is very still and powerfully concentrated which allows you to break through into the truth.
You can go on to develop past the jhana for the immaterial attainments, the last of which is the base of neither-perception-nor-non-perception, which is said after entering and leaving the the base of neither-perception-nor-non-perception one will either become a once returner or arahant, these are the only two options.
Hope this is clear
