How does Harry Potter save himself from the dementors?
In Harry Potter and the Prisoner of Azkaban, Harry is attacked by a swarm of Dementors and as his soul is being sucked out he is saved by what he thinks is his Father. He later learns that it is he himself performing the Patronus charm.
If he died in the first timeline, how can he be alive in order to 'go back' in time to save himself from that event?
There is no "first timeline"; there's only one timeline, in which Harry has always saved himself from the Dementors.
"I knew I could do it this time," said Harry, "because I'd already done it. . . . Does that make sense?"
Harry Potter and the Prisoner of Azkaban, chapter 21: "Hermione's Secret"
Different writers have different ideas of how time-travel works and how it influences the past or the future. Some of these ideas are of changing timelines and alternate futures, shifting from one into another. The most notable example of these is probably Back to the Future, where changes in the past ripple slowly into the future. People can go back in time to change the past, then witness how these changes affect the future.
In the case of Harry Potter and the Prisoner of Azkaban however, there is a stable timeline that happens to be folded back on itself. The timeline "just is".
There is a loop, but the loop has always been and will always be there. Harry couldn't have decided to do anything differently the second time. The grandfather paradox does not exist in a universe such as this; because no-one has murdered your grandfather before your father was conceived, no-one ever will. This is known as the Novikov self-consistency principle.
Another example of this principle is found in The Terminator, where Kyle Reese has always gone and will always go back in time to impregnate Sarah Connor with John. Note that the sequels in the Terminator franchise muddy the waters and introduce changing timelines and paradoxes, but the first film is consistent.
For a more complicated example, try the stories by Robert A. Heinlein "By His Bootstraps" and "'—All You Zombies—'", the latter of which was adapted into the movie Predestination.
Pictures about "How does Harry Potter save himself from the dementors?"
How does Harry Potter defeat the Dementors?To overcome the Dementors, Harry asked Lupin for assistance. Lupin began teaching Harry the Patronus Charm, using a Boggart, which transformed into a Dementor in front of Harry.
Why does Harry pass out from Dementors?"The reason Harry blacked out during dementor attacks is because this act of selfless love by Lily causes Voldemort unendurable pain whenever he experiences it. Like when he tried to possess Harry or touch him via Quirrel.
Who was the stag that saved Harry?I'm pretty sure you can clearly see Harry casting the patronus second time. Harry's patronus is a stag, Snape's one is doe. The "always" scene was Snape demonstrating his love for Lily to Dumbledore. (Snape's patronus was a Doe - like Lily's - and not a Stag - Like James or Harry!)
How do you protect yourself from Dementors?One of the most powerful defensive charms known to wizardkind, the Patronus can also be used as a messenger between wizards. As a pure, protective magical concentration of happiness and hope (the recollection of a single talisman memory is essential in its creation) it is the only spell effective against Dementors.
Patronus | Harry Potter and the Prisoner of Azkaban
More answers regarding how does Harry Potter save himself from the dementors?
I don't think I'll be able to explain the theory of time travel in my answer but it all comes down to Temporal Paradox
Time travel creates a timeline which doesn't have a starting or an ending point (closed loop) which means that had the time turner not been present, Harry would have died.
The cause and effect are both dependent on each other. So, Harry never dies. It's the Harry present in the parallel timeline who produces the Patronus to save himself.
The future Hermione drew Lupin away from the present Harry and Hermione. It is unlikely that Harry would have made it to Sirius in time after dealing with Lupin. Thus Harry is only near Sirus because Harry and Hermione had time traveled.