It’s a small lump of dough, which was originally fried in fat. So you can
see where the “dough” in doughnut comes from. The “nut” part is actually a
different way of saying “a small lump.” Originally, the name of the treat
was dough boy.
Doughnut vs. Donut: The Official Dictionary Spelling of
the word in question - if you’re into that sort of thing - is
“doughnut.” The expedited, simplified, Americanized spelling of
“donut,” as Grammarist tells us, has been around since at least
the late 19th century. It didn’t catch on, though, until late in the 20th
century.
Did you know they were originally called "oily cakes"?