The animals are eating 'comfits' which Alice gave them,
whatever those may be. Some kind of candy perhaps?
(Another contributor answered:) In Alice's times comfit was a candied plum (i. e. a plum poured over with melted sugar). Nowadays, though, it may be any other candied fruit, or any candy at all.
I kindly ask you to read everything on the Title Page of this picture collection carefully.