Before the Battle
Darth Vader, on nearing completion of the Death Star, had kidnapped Princess Leia because the Empire was lead to believe the Rebel Alliance had stolen the Death Star's plans and that she was in possession of them. Feeling the need to test the Empire's newest, most powerful weapon, they headed to the planet Alderaan, where after Darth Vader tried coaxing information out of the Princess. Giving them a false target, Grand Moff Tarkin ordered the destruction of the planet, demonstrating the Death Star's deadly firepower.
Taken into custody, Princess Leia was later rescued by Obi-Wan Kenobi, Luke Skywalker, Han Solo, and Chewbacca, who then planned an attack against the Empire with the plans Leia had given R2-D2 before she was kidnapped, and was later picked up by Luke Skywalker. The Rebels soon discovered the only weakness against the Death Star was and exhaust port that lead to the main reactor, allowing for a single proton torpedo to take down the mighty weapon.
Following the allowed escape and rescue of Princess Leia, Vader and the Empire tracked her to the Rebel Base on the fourth moon of the planet Yavin, where the Death Star soon arrived, escorted by a small fleet. While the Death Star charged its main planet destroying beam. Still planning their attack, the rebels had sent a small attack unit of X-Wings and to shoot down a communications satellite set up by the Empire so that they could relay information more easily. The small attack was a success and threw into confusion the Empire's defense and their ability to call reinforcements. Although two of the X-wings were shot down, the pilots of which were rescued later.
After several more preliminary strikes made by the rebels to several key points on the Death Star, including small hangars on the surface to limit it's ability to launch fighters, the rebels sent into action their main offensive attack. The assaulting fleet consisted of almost two dozen X-wings, eight Y-Wings, and a pair of R22 Spearhead starfighters.
At first, the Death Star tried to defend itself with it's laser batteries, but some had been shot by the preliminary rebel strikes, and those that were left were mainly used to fight off capital ships, much larger than the smaller more nimble fighters being used by the Rebel Alliance. The rebels were able to take down several of the turrets and a rookie pilot known as Rookie One was able to destroy a giant mounted ion cannon to set up the main phase of the assault.
Refusing to concede that the rebels were actually doing any damage the the Death Star, it's commander Grand Moff Tarkin did not send any of the station's vast resource of TIE fighters. So Darth Vader, under the realization that there might be even a minor threat, scrambled his personal fighter squadron. Soon after Vader's fighters launched and they attacked the Rebel forces, and the order to stop all laser fire from the Death Star had been given. Mostly because the lasers themselves were doing very little in shooting down any Rebels, and if they did manage to hit something it was just as likely they would hit one of the TIE fighters doing more damage.
The rebels main offensive bombing run had been planned for three attempts at a trench run, the first and second runs were executed by Gold Squadron, consisting of three Y-wings, and a squadron of three X-wings called Red Squadron, both of were unsuccessful and missed the small exhaust target. The third was lead by Luke Skywalker and two other X-wings, one of which was damaged and had to pull out while the other was destroyed.
It was at this time that the Death Star had fully charged it's weapon and was in position to fire. All seemed hopeless for Rebel Command and the last fighter who could take one last shot, Luke, disabled his targeting computer in his X-wing. However Skywalker was told by the spirit of old "Ben" Kenobi to "use the Force" to make the near impossible shot. Sensing how strong the Force was with Luke, Vader prepared to kill him, saving the Empire, and it was only the last minute heroic deed of Han Solo and Chewbacca in the Millennium Falcon that sent Darth Vader spinning out of control in space and saved Luke.
With the aid of the Force, that was newly discovered to him, Luke Skywalker guided his last minute shot perfectly down the planned target. Seconds before the Death Star fired it's main weapon the chain reaction from Luke's torpedos had started and the station was blown up, and all on board including Grand Moff Tarkin, thousands of Imperial officers, and over one million support troops and stormtroopers were killed.
As a direct result of the Rebel Alliance victory, they were now a legitimate threat against the Empire, and because of dissolution in the Imperial Senate, systems joined the Alliance in the months afterwards by the thousands. This caused the Empire to start occupying territories it had left untouched. The actions of both sides resulted in the escalation of the war.
Lastly, twenty five years later it was decreed by the New Republic Historical Council to institute a new calendar. Some were using the fall of Palpatine as a year zero, but due to the significance of the battle and destruction of the Death Star, the date of the battle of Yavin was established by the council as the official year zero setting up a "BBY", Before the Battle of Yavin, and "ABY", After the Battle of Yavin calendar.