The ability of a pope to resign was made official by Pope Boniface VIII who placed by decree into canon law:
“Our predecessor, Pope Celestine V, whilst he governed the Church, constituted and decreed that the Roman Pontiff can freely resign. Therefore lest it happen that this statute should in the course of time fall into oblivion, or that doubt upon the subject should lead to further disputes, We have determined with the counsel of our brethren that it be placed among other constitutions for a perpetual memory of the same.”
If a pope wishes to resign today, there are official steps that can be taken. According to the 1983 Code of Canon Law (Canon 332.2), “If it should so happen that the Roman Pontiff resigns his office, it is required for validity that he makes the resignation freely and that it be duly manifested, but not that it be accepted by anyone.”