This is a summary of what happened in halo and halo 2, although i would recommend to play both halos instead of reading these, since they are both great games with great stories.
Halo 1
The first levels of the game deal with an attempt to reach Halo's control center to uncover its purpose. It is soon discovered that the Covenant have accidentally released something from an ancient containment facility on the ring, The Flood, a parasitic race which gets its name from the way it devastates potential hosts with sheer numbers. The Flood then sweeps across Halo and devastate human and Covenant forces positioned on it. The release of the Flood prompts 343 Guilty Spark, an eccentric Artificial Intelligence who commands Halos containment forces, the Sentinels , to try to activate Halo's defense system, a pulse weapon that, when fired, would wipe out all life in the galaxy large enough to be hosts for the Flood. Technically, that installation only has a maximum effective radius of 25,000 light years, but the pulse would trigger other installations as well, effectively killing all life in the galaxy. This system is designed to stop the Flood from spreading through the universe if they escape confinement from Halo by the only way possible: starving the Flood of any life source large enough to sustain them.
Naturally, this would wipe out Humanity as well as the Covenant, and so the final levels of the game revolve around the Master Chief's attempts to destroy Halo before it fires.
The game leaves the story open to further developments, with the revelation that there are several Halo ringworlds in the galaxy, due to Halo being numbered "Installation 04" by 343 Guilty Spark, the Monitor of the installation. It is revealed in Halo 2 that there were seven (Bungie's favorite number) Halos before Installation 04's destruction.
Halo 2
Halo 2 continues and develops the story of Halo: Combat Evolved.
It then turns to Cairo Station, Cortana then reports that "15 Covenant Capital Ships holding position just outside the kill zone", and this is where the game-play begins. The UNSC Marine forces protecting the Cairo Station from the invading Covenant Naval infantry, then go to the surface of Earth to face the Covenant Army.
When the Invasion force led by the Prophet of Regret, is eliminated by the UNSC defenses, he flees from Earth through a slip-space portal, The human forces pursue Regret, and their jaws drop as they discover another Halo: Installation 05 which became to be known as Delta Halo.
After a series of battles in delta halo The Arbiter and Johnson confront Tartarus and his Brutes in the control room as he is trying to get Keyes' to use the Index. The Halos, we learn from Guilty Spark, were built to prevent the Flood from spreading throughout the Galaxy, and that the Forerunners who built it were wiped out when they fired it as a "weapon of last resort" at some point in the remote past. In spite of this, Tartarus forces Miranda to activate the ring in preparation to fire, to bring about - in his eyes - the Great Journey. As the Arbiter, the player must then fight Tartarus to retrieve the Index and stop the activation of Installation 05.
After the Arbiter kills Tartarus, Miranda retrieves the Index and the Installation cancels its firing sequence. Guilty Spark reveals that although the Index was removed before Delta Halo had time to complete its firing sequence, it sent signals to all other Installations in the Galaxy (a total of 7 rings), putting them on a dangerous standby mode. Now, they can only be activated remotely from a location called the Ark.
The scene then changes to Truth's Forerunner ship entering through slipspace near Earth, as the planet's defenses are in the midst of another battle. We see that Master Chief has stowed away on-board. When asked by Lord Hood what he is doing on the ship, the Chief replies, "Sir, finishing this fight", ending the game in an abrupt cliffhanger.
After the credits roll, a teaser for Halo 3 shows that the Flood has completely taken over High Charity.(the main city of the covenant)