The meaning of AD is Anno Domini or Year of our Lord referring to the year of Christ’s birth. The meaning of BC is Before Christ. CE is a recent term. It refers to Common Era and is used in place of A.D. BCE means Before Common Era.
Many different calendars have been used since man began tracking time. Most start with some epoch event or person. The use of BC and AD for numbering calendar years was invented by Dionysius Exiguus in 525 AD. His purpose was to determine the correct date for Easter under the direction of Pope St. John I.
Prior to this time, one method for determining Easter was based on a 532 year calendar cycle stemming from the Alexandrian era. Other methods were also used which led to the confusion. Dionysius was asked to determine a method for calculating Easter that would then be used by the entire church.
Dionysius did not want to perpetuate the name of Alexander, the Great Persecutor. He decided to start his 532 year cycle starting 753 years from the foundation of Rome. Today, based on historical evidence relating to Herod and astronomical evidence relating to eclipses and star novas, most historians believe Christ was actually born a few years earlier.
Dionysius named the years relating to his cycle, BC meaning Before Christ which starts with year 1 (moving backwards in time) and AD meaning Anno Domini, the year of Our Lord referring to the year of Christ’s birth (moving forward in time.) This is also a year 1. There is no year 0. (That’s the reason purists insists the 21st century actually began January 1, 2001. For example the first year began in 1 AD and ended the beginning of 2 AD so the first year of the 21st century begins in 2001 AD and ends with the beginning of 2002 AD)
It took about 400 years for the dating system devised by Dionysius to reach common usage.