I remember reading this book as a kid. It was a hard-cover book with a picture of an alien jumping up and down or dancing in the bottom right-hand corner of the cover. It was definitely geared toward young adults or children. A chapter book.
The protagonist is a boy who travels beyond the walls of his home. Eventually he learns his home is at the center of a giant spaceship through which he has been traveling through all its layers. I believe the alien creature from the cover was his companion and had a quirky, funny personality. I also remember the boy eating cube-shaped food that arrives automatically and not knowing where it comes from until he travels to one of the other “worlds” (layers of the ship) and sees that food is produced and sent to them from another place.