From Thor to Infinity War, what Loki actually does, and how fans read it.
Loki 'dies' in Thor, fakes his death in The Dark World, and really dies in Infinity War. Follow what he does in each film, and see where the film record ends and the redemption reading begins.
Levels marked "Sourced facts" are checked against the sources listed at the bottom. Levels marked "Fan theory" are interpretation, not confirmed by the films or their makers.
Thor (2011): Loki learns he is the son of the Frost Giant king Laufey, adopted by Odin. He plans to destroy the Frost Giants' world to prove himself to Odin; when Odin rejects him, he lets himself fall into the abyss. The Avengers (2012): he returns with the scepter, invades New York with the Chitauri, kills Agent Coulson, and is beaten and taken back to Asgard. Thor: The Dark World (2013): after their mother Frigga is killed, he helps Thor, appears to die saving him, and turns out to be alive and disguised as Odin. Thor: Ragnarok (2017): he betrays Thor again on Sakaar, then comes back with a ship to help the Asgardians escape, and the brothers make up. Avengers: Infinity War (2018): he hands Thanos the Tesseract to save Thor's life, pretends to join Thanos, tries to stab him, and is killed.
Wikipedia's Loki article, citing the films, says he felt neglected by Odin in favour of Thor and grew closer to Frigga, who taught him magic. It also says the scepter he carries in The Avengers amplified his hatred for Thor and Earth without him knowing. On Loki's death, Tom Hiddleston said it was powerful that Loki calls himself an Odinson, and that it closes Loki's journey (quoted in the same article).
This part is interpretation. Many fans read Loki's arc as a slow redemption: each 'death' strips away something (his need for Odin's approval, his pride, his habit of running), until in Infinity War he finally puts his brother first. The films support the bookends (rejected by Odin in Thor, dying to protect Thor in Infinity War), but the middle steps are a reading of the story, not something the filmmakers spelled out.