Theoretically speaking, there are very few limitations when it comes to who can be elected pope. Any Catholic male can be eligible if he meets certain conditions. If he has reached the age of reason, is not a heretic, is not in schism, and is not “notorious” for simony, he can, in theory, be elected a pope. Even “be Catholic” clause can be waived if there are sufficient reasons that the person in question will convert to Catholicism as soon as possible. The idea behind such loose rules is the possibility of electoral college electing a pope via acclamation, in case of divine inspiration, rather than through a formal process.
In practice, things are a bit different. The electoral college, called Papal conclave, consist of cardinals and the last time someone who isn’t one was elected pope was in 1379. Pope Urban VI was the Archbishop of Bari before elected to lead the Catholic Church and the last non-cardinal to seat on St. Peter’s throne.
Another unwritten rule is that anyone who hopes to be elected a pope must meet the requirements of being a bishop since one of the pope’s titles is the Bishop of Rome. If he is already a bishop, he would be expected to set that title aside. If he is not a bishop, he will be consecrated as a bishop immediately after the election. The canon doesn’t mention being a priest as a condition, so if a layman were elected, he would be first ordained a priest and then made a bishop, after which he could claim the title of Pontifex Maximus or the Holy Roman Pontiff.
Knowledge of Italian is also a must since that is the language of the church’s administration in the Vatican. It would be very hard for the pope that doesn’t speak Italian to conduct the daily business of running the Vatican, so it has become another unwritten rule.