How are all popes descendants of the first pope?

By Apostolic Succession. That is the laying down of hands at the ordination to bishop (the last 'step' of the threefold ordination). Then a bishop is created cardinal by the current pope. One of these cardinals is to be elected pope during the big meeting after the death of a pope. E.g. Cardinal Ratzinger had been elected as pope Benedict XIV.