*Ahem*
On the planet of cybertron there lived a race of transforming robot aliens called cyber-tronians or transformers. There leaders are primes, when the matrix of leader ship chooses some one to be a prime, they get increased strength and power. One day megatron(bad guy), a gladiator in kaon(the city of decepticons who are the bad guys as well), tried to force the primes to let him be a prime. His brother in arms orian pax then said that peace is needed and that Megatron should not be a prime. Orian pax was chosen for the next prime in a bit. Megatron formed the decepticons and waged war on cybertron. Orian then became Optimus prime. After a couple years of fighting the auto-bots(good guys being led by Optimus prime) make a ship called the Ark to leave cyber-tron as the planet was dying. The decepti-cons made their own ship called the nemesis.
The ships battled in space and eventually crashed onto earth. The auto bots make human allies(except in the latest anime) and fight the decepti-cons on earth.
In the original series there was a movie in 1990 something. Where auto bot city existed. It was in this movie where Optimus prime and mega-tron have a final show down. Optimus wins but at the cost of his life.
Watch the movie yourself to see what happens in it.
There are many different continuity’s and universes and the events are different. Watch the original show first then you will know the main plot point.