Since 1983, the Vatican has held these requirements for one to be officially canonized as a saint:
Firstly, a candidate must be nominated by a bishop in order to investigate the life and works of an individual, no earlier than five years after the candidate's death. The bishop then transfers the investigation to a postulator, who transmits this to the Vatican.
The Pope must then determine whether the candidate lived a life of heroic virtue.
Once this is done, the candidate must then receive beatification. Martyrs only require a declaration of martyrdom to be declared beatified, while non-martyrs require a miracle to be attributed to their intercession. Most miracles tend to be medical miracles, e.g., a sick patient was spontaneously and enduringly cured after prayers were directed to the candidate, and no natural explanation for the cure can be determined.
Finally, canonization generally occurs after at least two miracles can be attributed to a candidate's intercession.