Iron Man is the closest ally and friend of War Machine, who wears a similar suit of armor and fights alongside him. They have also clashed occasionally over moral and political issues.
Captain America is another ally of War Machine, who is a fellow member of the Avengers and a respected leader. War Machine supported Captain America during the Civil War storyline, where they opposed Iron Man's stance on the Superhuman Registration Act.
Black Widow is an ally of War Machine, who is a fellow member of the Avengers and a skilled spy and fighter. War Machine and Black Widow have worked together on several missions and have a mutual respect.
Thanos is an enemy of War Machine, who is the main antagonist of the Infinity Saga and a cosmic tyrant. War Machine fought against Thanos and his army in the Infinity War and Endgame movies, where he was nearly killed by the snap and later helped restore the universe.
Whiplash is an enemy of War Machine, who is a villain and a rival of Iron Man. Whiplash attacked War Machine and Iron Man at the Monaco Grand Prix in the Iron Man 2 movie, where he used electrified whips to damage their suits.