Is ceiling and roof similar?
What is the difference?
Does a cave have ceiling or roof? because there sometimes are holes.
Not necessarily. If you consider the terms "ceiling" and "roof" being limited in application to buildings or like structures (such as caves) only, then:
Ceiling is the uppermost covering wall in any room inside the building.
Roof is the other side of the ceiling, outside the house.
Thus, a cave has a ceiling, but not necessarily a roof, as, if the cave is in a mountain, you probably wouldn't call the peak of the mountain the roof of the cave.
As @J.R. pointed out, "ceiling" and "roof" are used interchangeably and as synonyms by cave explorers, also known as spelunkers. Even then, IMHO, the (arguably) correct term to use for the purpose would be "ceiling", for reasons explained above.