How do Saints get Canonized?

When the Catholic Church decides to invoke the intercession of a potential saint whom they consider to be in heaven and carries a little influence after living an exemplary and holy life. The church follows an investigation process into the persons life and also examination of the corpse to check if it’s corruptible or not. But all these steps are human and therefore are fallible. Thus, there’s the need for a divine sign which is miracle.
Miracle is the church’s core judgment to confirm the virtue or martyrdom of the Servant of God. In other words, a miracle is considered to be a proof that the person is in heaven and can intercede with God.
Pope Gregory IX, in conjunction with the canonization of St. Anthony of Padua in the 13th century was the one who instituted the principle that neither virtue without miracles nor miracles without virtue gives enough grounds for sainthood.
Today about half percent of miracles used in sainthood are medical in nature and are properly evaluated by a panel of medical doctors. Meanwhile, to be recognized as a saint in heaven requires that a miracle has taken place through the intercession of that person.
The miracle is usually a healing of a serious and pathological disease or condition. The healing has to be immediate, permanent, and complete which medical science cannot explain. When the Miracles have been proven medically and scientifically unexplainable by a group of independent doctors, then the person is confirmed by a panel of theologians, and then the final decision and approval lies with the pope. If he eventually approves it, the person will be beautified and then declared a blessed.
Then the Church will await another Miracle from the same person. If two postmortem miracles occurs, the person will be canonized and called a saint.
Just as in the case of Pope John Paul II. The Vatican has confirmed that the intervention of Pope John Paul II is responsible for at least one miracle which is the inexplicable healing of a French nun suffering from Parkinson’s disease. That paved the way for the pope’s beatification on May 2011. And the church is looking forward for the second miracle which will be his final step to sainthood.