I think they're usually made with stop frame animation. Which are individual frames which alter slightly from each other so it creates a movement when it is played somewhat rapidly after one another....
Arguably the fist animate cartoon may be found in such prehistoric cave paintings where animals are painted with multiple sets of legs to portray animals in motion. There is an Egyptian mural which...