The first examples of trying to capture motion into a drawing can already be found in paleolithic cave paintings, where animals are depicted with multiple legs in superimposed positions, clearly attempting depicting a sense of motion.
The phenakistoscope, zoetrope and praxinoscope, as well as the common flip book, were early animation devices to produce movement in drawings using technological means, but animation did not really develop much further until the advent of motion picture film.
The first animated cartoon (in the traditional sense, i.e. on film) was "Fantasmagorie" by the French director Émile Cohl.
One of the very first successful animated cartoons was "Gertie the Dinosaur" by Winsor McKay. It is considered the first example of true character animation.
In the 1930s to 1960s, theatrical cartoons were produced in huge numbers, and usually shown before a feature film in a movie theater. MGM, Disney and Warner Brothers were the largest studios producing these 5 to 10-minute "shorts".
Competition from television drew audiences away from movie theaters in the late 1950s, and the theatrical cartoon began its decline. Today, animated cartoons are produced mostly for television.