So how does Apostolic Succession work? This is similar to martial arts, the Master has to teach his disciple all his skills. When the disciple has learned all his Master’s skill, he will succeed his Master. If there are many disciples, the Master will choose one to be his successor. This process is the same as the Apostolic Succession, Our Lord Jesus Christ chose His Successors, the Apostles, made them Bishops and Saint Peter as the leader (the Pope). The Apostles then chose their own disciples and made them Bishops as well. These Bishops also had their own disciples and made them bishops and so the process continues until the generation of priest today. It is similar to the Pope, before the death of Saint Peter, he chose Saint Linus as his successor in the Papacy. Then Saint Linus chose Saint Anacletus as his successor. Them again, Saint Anacletus chose his Saint Clement I as his successor, and this process continues until it changed to Papal Conclave, even though the previous popes does not personally choose their successor, the cardinal that was voted as the Pope is still an apostolic succession, because the Cardinals are also the Pope’s disciples.
But what about a Priest, who removed himself from the Catholic Church, and institute his own church like Martin Luther? Was he a valid successor of the Apostles? The simple answer for this is that Martin Luther, when he began his Heresy, he was officially removed from the Apostolic Succession. Because his teaching is heretic and created false ideas to the faithful that leads into danger of their souls. He denied the teachings of the apostles and the first Christian father, as he denied it, he also denied the teachings of God. Because the Holy Spirit guides the Catholic Church. Same for the other priest who created their own religion like the Aglipayan Church.