“Anime” refers to animated cartoons done in the distinctive Japanese style – huge eyes, small mouth, simplistic faces, highly detailed everything else. Originated by Go Nagai about a zillion years ago in his comics.
“Hentai” is, from what I understand, a Japanese word meaning, roughly, “anime with sexual content”, ranging from nudity to hardcore sex to weird sex with nonhuman beings, anything from cute little teddy bears to hideous tentacled things that would scare H.P. Lovecraft.