The Sun is an integral part of what makes life possible on Earth, but like almost anything else, it won't last forever. At some point, the Sun will eventually die. While it's an unfortunate truth, the good news is that this shouldn't happen for a long time to come.
Keep in mind that the Sun only exists because of a process called nuclear fusion. As it occurs, hydrogen atoms combine into helium atoms at the star's core, but there's only so much to go around. As the hydrogen depletes, the Sun will swell and become a red giant large enough to engulf most of the solar system's inner planets - Earth included.
Scientists aren't 100% sure how long it'll take for this to happen, but what they do know is that Earth would become so hot from the expanding Sun that life would cease to exist up until the Sun eventually swallowed our planet. Nevertheless, it wouldn't be the end of everything.
By the time the Sun became this big, it'd supposedly shift our solar system's habitable zone and warm up the solar system's outermost planets and their moons and potentially create an environment suitable for life. Then again, even these traces of life would last only up until the Sun eventually fizzled out.