The Enterprise discovers that an apparent asteroid on a collision course with a planet is actually an ancient populated generation ship.