Welcome Nathan10828,
“Why are the movies divided into phases?”
The main reason is because each phase culminates with an Avengers movie.
The Avengers movies are kind of like “season finales” for the group of movies that precede them, crossing over all of the characters and tying up story arcs.
“How are they divided?”
“How do they determine them?”
Phase One is Iron Man, The Incredible Hulk, Iron Man 2, Thor, Captain America, and The Avengers. Avengers is a conclusion to the stories in the previous movies.
Phase Two is Iron Man 3, Thor: The Dark World, Captain America: The Winter Soldier, Guardians of the Galaxy, Avengers: Age of Ultron, and Ant-Man.
Avengers 2 (Age of Ultron) ties up the storylines from Phase Two.
The reason why Ant-Man is officially classified as the “end” of Phase Two, rather than the beginning of Phase Three, is because of release dates. Ant-Man came out only two months after Age of Ultron, while the next film Captain America: Civil War came out a year later.
I think it has to do with home video sales (because this was back when DVDs were all the rage and streaming services barely had anything on them). From what I’ve heard, it was easier to market and sell Age of Ultron and Ant-Man together because of how close together they released.
Thus, it made more sense to put them in the same phase from a business perspective.
For example, making Ant-Man Phase Two allows them to include it in a “Phase Two Box Set”.
Thus, Ant-Man became a kind of awkward “epilogue” to Phase Two.
Same with Phase Three. Phase Three begins with Civil War. I won’t list all the Phase Three films but Avengers: Endgame is the conclusion of not only Phase Three, but all of the films from the beginning of Phase One. However, Spider-Man: Far From Home released only two months after Endgame, like Ant-Man.
So even though Far From Home, narratively, feels like the start of a new story, Marvel brands it as “Phase Three” so they can release it together with Endgame and the others.
“Do they take inspiration from specific comics for each of these movies?”
Sometimes they do and sometimes not.
I don’t know all of the comic inspirations for each film, but I can tell you that the original suit Tony builds in the cave in Iron Man 1 was directly modeled after Iron Man’s first design from the 1960s.
“Incredible Hulk” was the name of the first Hulk comic run.
In Thor, Jane Foster has an ex-boyfriend named “Donald Blake,” which is a reference to the oldest Thor comics where “Thor” was really just a guy named Donald Blake who weilds ‘the Power of Thor.’
Captain America 1 is likely just a reworking of his WWII origin.
The very first Avengers Comic in 1963 was Iron Man, Thor, the Hulk, Ant-Man, and the Wasp, fighting against Loki, so Avengers (2012) was actually pretty close to the original comic.
In the comics, “Drax the destroyer” was a being created for the sole purpose of destroying Thanos. So that was likely the inspiration for Drax in Guardians of the Galaxy, and his vendetta against Ronan and Thanos.
I think Nebula was Thanos’s grand daughter in the comics as well.
I know Ultron was a huge Avengers villain in the comics, and Joss Whedon wanted to use him in Avengers 2.
“Civil War” was a huge storyline in the comics.
The comic began with a destructive incident which led to the government introducing “Registration” for all powered people. Captain America was against it and Iron Man was for it. Iron Man was basically the villain of that comic, and it ended with Captain America surrendering. So the Civil War movie was very close to that.
In the Doctor Strange movie, Strange is allies with another sorcerer named Karl Mordo. But by the end of the movie, they’re enemies.
In the comics, Baron Mordo was Strange’s arch nemesis, so the Doctor Strange movie was trying to give them a complex history so that their confrontation in the second movie would have weight behind it (although plans were later changed).
Guardians of the Galaxy Vol. 2 features a god-like being named Ego, who calls himself a Celestial and has built an entire planet.
In the comics, he was known as “Ego the Living Planet” and he was just a giant planet with a face. He was not, however, a Celestial, so that was a change.
Also, Star-Lord’s lineage was different in the comics.
In the comics, his father was a man named J’son of Spartax, ruler of the Spartoi Empire (which is why Peter Quill’s middle name is Jason).
Thor: Ragnarok pulls from three different sources: The Thor comics, actual Norse Mythology, and a comic called Planet Hulk.
In Norse Mythology, Ragnarok was the prophesied destruction of Asgard.
And in both the mythology and the comics, Asgard was supposed to be destroyed by Fire Lord Surter, the lord of Muspelheim, the fire realm.
However, there was also a story about the Hulk being banished from Earth. He ended up on a planet called Sakaar where he became a gladiator and eventually took over the planet. So Thor: Ragnarok is basically just Ragnarok remixed with the Planet Hulk comic.
Also, the “Grandmaster”, in the comics, was the Collector’s brother, and they both had Infinity Stones.
There was a storyline in the comics called The Infinity Gauntlet.
Thanos, in the comics, was in love with a cosmic entity named Mistress Death, but she didn’t love him back. She didn’t even speak to him. She communicated only thorugh her servant. Mistress Death believed there was an imbalance in the universe; not enough people were dying. So Thanos resolved to kill half of all life on Earth to impress her.
In a comic series called “The Thanos Quest,” Thanos tracks down all six Infinity Stones, to rewrite reality itself.
He takes the Soul Stone from someone named the In-Betweener.
He takes the Power Stone from a warrior named the Champion.
He takes the TIme Stone from someone named the Gardener.
He takes the Space Stone from someone named the Runner.
He takes the Reality Stone from The Collector.
And he took the Mind Stone from the Grand Master.
Then, in “The Infinity Gauntlet”, Thanos returns to Mistress Death with all six stones. And she still won’t pay attention to him. He conjures up a huge shrine in her honor in the middle of space and she doesn’t care. So he snaps away half of all life.
And she still doesn’t care.
The Avengers, meanwhile, try to figure out what to do.
A cosmic being named Adam Warlock, who has a history with Thanos and is connected to the Soul Stone, becomes their leader and concocts a plan to defeat Thanos.
Adam sends The Avengers and other heroes to Thanos’s shrine to fight him.
Thanos lets them fight him, to try and impress Mistress Death.
Almost all of them die.
Captain America’s shield is shattered.
Nebula is turned into a barely alive withered husk — but then, Adam tells the Silver Surfer to use his insane speed to try and snatch the Gauntlet off Thanos.
He fails.
Thanos even says “Thanos is inevitable.”
Then all of the Cosmic Entities show up and Thanos defeats them too, including the being Eternity, the embodiment of the universe itself.
Thanos takes Eternity’s place - but he’s not paying attention.
Nebula, in her withered husk form, crawls to Thanos and rips the gauntlet off.
She reverses everything, including the Snap - but she’s a little crazy.
So Adam Warlock goes into the Soul World, then emerges from the Soul Stone, and steals the Gauntlet that way (which he can only do with Nebula).
Adam Warlock ends up with the Gauntlet and says "Let the conflict end."
Avengers: Infinity War is basically the Thanos Quest, just with the stones in different places except the Reality Stone and the Collector.
Mistress Death’s philosophy that “not enough people are dying and there’s an imbalance” was used as Thanos’s motivation in the film.
It should be noted that “Infinity War” is also the name of a comic that came after Infinity Gauntlet, but I don’t think anything from that comic is in the Infinity war movie.
Endgame isn’t based on any storylines I know of, aside from Infinity Gauntlet.
Mysterio, in the comics, I think had magical powers that could create illusions.
So in the movie, they just replaced that with holograms.
And Adam Warlock eventually showed up in Guardians 3.
Hopefully this helped.