Harley Quinn was originally created for a one-time appearance on Batman: The Animated Series, and was so popular that she was added to the canon!
Harley Quinn was first introduced in 1992 to the Batman: The Animated Series, and she was the animated equivalent of a walk-on role. She wears traditional harlequin jester clothing, hence her name Harley Quinn. The episode called for a number of police officers to be taken hostage by someone jumping out of a cake, and the writers thought it’d be weird to have the Joker do that.
The Joker ended up doing it anyways, but that’s not the point. They created the super villain Harley Quinn, the girlfriend/sidekick of the Joker. She appeared in a dream sequence, instead. She was so popular, that she became a regular and was added to the canon. In the comic book, she’s described as Harleen Quinzel, a psychiatrist at the Arkham Asylum.
She falls for the Joker and becomes his accomplice and sometimes lover/sidekick. She falls hopelessly in love with the Joker and helps him escape the Asylum, and thus it began.