Over the years, Batman's origin story, history and tone have undergone various revisions, both minor and major. Some elements have changed drastically; others, like the death of his parents and his pursuit of justice, have remained constant.
Consistent across all versions of the Batman mythos, Batman is the alter-ego of Bruce Wayne, a millionaire or billionaire (depending on time period) playboy, industrialist and philanthropist who was driven to fight crime in Gotham City after his parents, the physician Dr. Thomas Wayne and his wife Martha Wayne, were murdered by a mugger.
Golden Age version
The Golden Age Batman's origin was first presented in Detective Comics #33 in November 1939, and was later fleshed out in Batman #47, the 1985 four-issue limited series America vs. the Justice Society and 1986's Secret Origins (volume 2) #6.
As these comics state, Bruce Wayne was born in the late 1910s to Dr. Thomas Wayne and his wife Martha, two wealthy Gotham City socialites. Bruce was brought up in Wayne Manor and its wealthy splendor and led a happy and privileged existence until the age of eight, when his parents were killed by a small-time criminal named Joe Chill on their way home from the movie theater. Bruce was subsequently raised at Wayne Manor by his uncle, Philip Wayne.
Bruce Wayne swore an oath to rid the city of the evil that had taken his parents' lives. He engaged in intense intellectual and physical training and studied a variety of areas which would aid him in his endeavors, including chemistry, criminology, forensics, martial arts, and gymnastics, as well as theatrical skills like disguise, escapology, and ventriloquism. He realized, however, that these skills alone would not be enough.
"Criminals are a superstitious and cowardly lot," said Wayne, "so my disguise must be able to strike terror into their hearts. I must be a creature of the night, black, terrible..." As if responding to his desires, a bat suddenly flitted through the window, inspiring Bruce to assume the persona of Batman. His debut as the Caped Crusader 1939 initially earned him the ire of the police; however, his relations with the law thawed by the early 1940s.
In 1940, Bruce took in the orphaned circus acrobat Dick Grayson, who became his sidekick, Robin. Also in late 1940, Batman became a founding member of the Justice Society of America (DC Special #29).
Batman continued to function in Gotham City through the 1940s and into the 1950s. After the introduction of DC Comics' multiverse in the 1960s, it was retroactively established that the Golden Age Batman lived on the parallel world of Earth-Two. It was also revealed that in the mid-1950s, Bruce Wayne had partnered with and married the reformed Catwoman, Selina Kyle (as shown in Superman Family #211); the two had their first and only child in 1957, Helena Wayne. Batman's activities soon lessened, as he went into semi-retirement, only returning to action to engage in special cases, with Robin taking over much of his functioning in Gotham City. Upon the retirement of Commissioner Gordon, Bruce Wayne took over the post of Gotham City police commissioner.
In the late 1970s, Bruce Wayne's life became tumultuous, as he dealt with the death of his wife Selina, who was fatally blackmailed by criminals into going into action one more time as Catwoman (as seen in DC Super-Stars #17). After Selina's death, Bruce permanently retired as Batman, but was forced to go into action again as Batman, when a criminal named Bill Jensen had gained superpowers from a sorcerer named Frederic Vaux. Jensen and Wayne fought each other, with Jensen eventually using his powers to destroy both himself and Batman. Wayne was laid to rest next to his wife Selena; after Vaux was defeated, the sorcerer Dr. Fate used his powers to erase from human memory the knowledge of Wayne's secret identity, making all think the two had perished at almost the same time. (Adventure Comics #461-463).
Silver Age version
From the 1950s through the 1970s, various new elements were added to Batman's origin, background and history. The Silver Age Batman first appeared sometime in the mid-1950s, with an origin that was (as revealed in various stories in the ensuing decades) similar to that of the Golden Age version of Batman. While the Golden Age and Silver Age distinctions are useful for discussing the character's evolution over the decades, the character's evolution was gradual, and there is no specific comic issue at which the Golden Age version gave way to the Silver Age version. Likewise, the character as he appeared near the beginning of the Silver Age (in the mid-1950s) was different in many ways than he appeared near the end of the Silver Age (in the mid-1980s), due to many minor revisions and new directions in the character's publication history.