Anime shows are known for long, complex plots that involve drama and massive character development, often taking several episodes to complete. Cartoons typically involve short, basic plotlines that focus on humor more than anything else.
For many years, cartoons have been believed to be primarily for young audiences (some dating back to World War II were made for older viewers and have since been edited). Anime is often made for a much wider demographic, usually catering to adults.
Cartoons usually follow a straight "good versus evil" storyline. Anime shows blur the line between good and evil and make the story more ambiguous as to what side the viewer might be puling for.
While cartoons usually feature a likable hero (often alongside a damsel) with a detestable villain (who might eventually become liked just for comic relief), anime will often feature villains that are as sympathetic as the hero and protagonists that might surprisingly become the antagonist.
In both cases, the written equivalent of these animated shows have different names as well. Stories told on paper through pictures are called comics in the Americas and called manga in Japan.